Skip to main content

Posts

How will you make Aurora to communicate with a Lambda?

Step 1: Create an IAM policy as follows: { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAuroraToLambdaFunction", "Effect": "Allow", "Action": "lambda:InvokeFunction", "Resource": "arn:aws:lambda:<REGION>:<ACCOUNT_NO>:function:<FUNCTION_NAME>" } ] } Step 2: Create an IAM role and attach the policy above and have the trust policy as follows: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "rds.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Step 3: Link the above IAM role with the Aurora DB cluster Step 4: Allow outbound communication from Aurora C...

Ports

Ports: 22 - SSH 80 - HTTP 443 - HTTPS 1433 - Microsoft SQL Server 1434   - Microsoft SQL  Monitor 3306 - MySQL DB System 3389 - Microsoft RDP 5432 - PostgreSQL

AWS Aurora

What are the two modes of Aurora you can have? MySQL PostgreSQL What are the different Database locations you can provision your Aurora DB with? Regional - Provision Aurora DB in a single AWS region Global - In multiple AWS regions. It has primary & secondary regions. Data written in DB in primary region gets replicated in the secondary regions in < 1 sec. How will you achieve fast failover/high availability? Through Multi-AZ deployment Can you backup Aurora DB? Yes, by creating point-in-time snapshots. We can set up retention period for these backups. We can also copy tags to snapshots. Can you encrypt data in Aurora DB? Yes. You can use the KMS keys . I have added few incorrect data and I want to go back to my previous good state in Aurora DB. How would I achieve this? You can quickly rewind to a specific point-in-time by Enabling Backtrack. But, this will cost you to save the changes you made for backtracking. What are the various DB features available in Aurora DB? One wri...

AWS S3 Cross Region Replication

What are the constraints to enable S3 cross region replication? To enable cross region replication, you should have two buckets: Bucket 1 - should be in region A Bucket 2 - should be in region B Versioning should be enabled in both the buckets for replication. Can you create same region replication? Yes Can you create cross account replication? Yes Can you replicate a subset of objects using replication? Yes, you can limit the scope of the replication rules to specific prefixed/tags etc., You can also apply the rules to all the objects in the bucket What is the expected delay in copying the files from the source to destination buckets in S3 replication? A few seconds. Can you replicate only the new objects? The new objects can be replicated after enabling the replication rule. However, the already existing objects can also be replicated by enabling Replicate existing objects option.

AWS VPC Flow Logs

You can find the IP addresses where requests to your VPC Network Interfaces are coming from through the VPC Flow Logs . These logs can be published in S3/CloudWatch . You can also view/query the data through Athena .

AWS EBS

DeleteOnTermination attribute: The EC2 instances will have Root EBS volumes. When you terminate an EC2 instance, the Root EBS volume will also get deleted. To prevent this, set the DeleteOnTermination attribute, for the EBS volume, to false. This will prevent the EBS volume from being deleted even when the EC2 instance is terminated. A comparison of EBS volume types: General Purpose SSD  - recommended for most workloads Provisioned IOPS SSD  - use this when the required number of input/output operations per second is high (10000 IOPS or 160 MiB/s of throughput per volume) Throughput Optimized HDD   - use this for a fast throughput at a lower price Cold SSD  - use for large volumes of data which are in frequently accessed Where are the snapshots stored? In S3. Can you directly create a snapshot in another region? No. You have to create a snapshot in the same region and copy that snapshot to another region. Is it safe to copy the snapshot to another region? What if oth...

Availability Zone Disruption

Availability Zones (AZs) are nothing but data centers within a region. For example, North Virginia has the maximum of 6 AZs. An AZ is geographically separated from another AZ. Suppose a natural calamity, like earthquake occurs, in the region of an AZ, say 1A, the entire AZ will not be available. This is called Availability Zone Disruption . In such cases, we should make our applications highly available by scaling them across other AZs. Minimum good number of AZs is 2.