PP WL Flashcards

1
Q

What is the max message size in a queue?

A

256kb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can an SQS be created to handle messages greater than the max size of 256kb?

A

use the AWS SDK for Java to store large messages in an Amazon S3 bucket

This way is efficient because it stores a reference (the s3 object URL) in the message, instead of storing the entire message in SQS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An app uses SQS to buffer messages from EC2 instances

An AWS app has been taking a long time to process messages and user’s have been receiving multiple messages

What change can you make to the SQS queue to ensure users only receive 1 message?

A

Increase the visibility timeout to 5 mins using ChangeVisibilityTimeout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You are a developer that has recently been hired for your API expertise. The company is currently using API gateway services for deployment. You need to control the behaviour of api’s front end actions. Which 2 could be used to acheieve this:

A
  1. Modify the configuration of the method request (set up validation, params, headers etc)
  2. Modify the configuration of the method response (define headers, status codes etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You have set up an EC2 instance attached to an elastic load balancer in the UK and US region

How would you configure Route 53 record sets from a domain in Route 53 to split traffic equally between the two load balancers?

A

Create 2 record sets:
1. UK
2. US

Set a weighted routing policy as 1:1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a record set in the context of route 53?

A

a collection of DNS resource records with the same name and type

ie.,
Name: www.example.com
Type: A
TTL: 300
Resource Records:
- IPv4 Address: 192.0.2.1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does it mean if the time to live = 300secs for a record set?

A

It means DNS resolvers can cache this record for up to 300 seconds before needing to refresh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In the context of Route 53, what is an Alias target?

A

lets you map your record to a hosted zone so instead of using

Resource Records:
- IPv4 Address: 192.0.2.1

you could use
Alias Target: ALIAS to some-aws-resource.amazonaws.com (e.g., an Elastic Load Balancer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You have a serverless app with AWS Lambda and a backend with DynamoDB.

How would you alert the team if there was latency in a component?

A
  1. Enable X-RAY tracing in Lambda ONLY
  2. Use the SDK inside Lambda to monitor API calls to DynamoDB
  3. Send the data to Cloud Watch
  4. Create a metric to trigger an SNS alert when response times get too high
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When a message is sent to an SNS topic with multiple SQS queues subscribed, why does each queue receive an identical message almost instantly?

A

Because of the fanout mechanism of SNS

It sends a message to all SQS queues subscribed to the topic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How would you monitor incoming client connections to your Elastic Load Balancer which is sitting in front of your app deployed on an EC2 instance?

A

Enable access logs on the load balancer which show the time, client’s IP address, latencies, request paths and server responses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A company writes 10 items that are each 15.5kb to DynamoDB every 1 second

What is the write throughput for best performance

A

size / 1kb (rounded)
15.5/1 = 15.5 which rounds to 16

16 * 10 = 160

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A pharmaceutical company has deployed its dealer network app to a bunch of EC2 instances. How would they use Cloud Watch logs to search for missing files/resources at positions in the code & report this data as a metric

A
  1. Create a custom IAM role
  2. Associate the IAM role with EC2 instances
  3. Install Cloud Watch agent on EC2 instances
  4. Create log groups in Cloud Watch logs through the console & a CloudWatch agent configuration file
  5. Use filters to search for 404 errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the issue with “aws Dynamodb delete-item”?

A

CLI commands must all be lower case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the issue with:
“ProductCategory IN (cat1) and (Price between :lo and :high)”

A

Missing colon before cat1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Mary set up a new environment for her app using Docker, but she isn’t able to connect to the EC2 environment in the project VPC which has been set up using IPV 4 CIDR block 172.17.0.0/16.

What solution could resolve this problem?

A

Configure a new VPC for the instance backing the EC2 environment using a 192.168.0.0/16 as the CIDR block

17
Q

An automobile company isn’t able to provision and maintain a consistent environment state

Currently, EKS is rolling out Kubernetes jobs using Spot instances to create new microservices for a new environment request by the user, but spot instance are deleting the underlying nodes and jobs are getting terminated. This is disrupting the chain of environment creation for different units

How can we resolve this?

A
  1. Integrate API Gateway that will trigger Lambda functions to spin off new instances
  2. Isolate and decouple the app using SQS and SNS with a Dead Letter Queue to handle unconsumed messages
18
Q

Describe how data is stored in an Elasti Cache cluster?

A

Data is portioned across nodes

memory capacity = number of nodes * (RAM capacity of a node - system overhead)

19
Q

11 nodes, each node has 3.22GiB memory and 2 cores

What is the memory capacity of the Elasti Cache cluster?

A

memory capacity = number of nodes * (RAM capacity of a node - system overhead)

11 * 3.22 - 0 = 35.42

20
Q

What would you do if you wanted to scale an EC2 instance and since you were doing the release you also wanted to install an update?

A
  1. Configure lifecycle hooks to transition the instance to a wait state & ensure the script with commands to update dependencies is executed
  2. After this they can be added to an Auto Scaling group and can be ready to receive traffic