PP WL Flashcards
What is the max message size in a queue?
256kb
How can an SQS be created to handle messages greater than the max size of 256kb?
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
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?
Increase the visibility timeout to 5 mins using ChangeVisibilityTimeout
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:
- Modify the configuration of the method request (set up validation, params, headers etc)
- Modify the configuration of the method response (define headers, status codes etc)
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?
Create 2 record sets:
1. UK
2. US
Set a weighted routing policy as 1:1
What is a record set in the context of route 53?
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
What does it mean if the time to live = 300secs for a record set?
It means DNS resolvers can cache this record for up to 300 seconds before needing to refresh
In the context of Route 53, what is an Alias target?
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)
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?
- Enable X-RAY tracing in Lambda ONLY
- Use the SDK inside Lambda to monitor API calls to DynamoDB
- Send the data to Cloud Watch
- Create a metric to trigger an SNS alert when response times get too high
When a message is sent to an SNS topic with multiple SQS queues subscribed, why does each queue receive an identical message almost instantly?
Because of the fanout mechanism of SNS
It sends a message to all SQS queues subscribed to the topic
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?
Enable access logs on the load balancer which show the time, client’s IP address, latencies, request paths and server responses
A company writes 10 items that are each 15.5kb to DynamoDB every 1 second
What is the write throughput for best performance
size / 1kb (rounded)
15.5/1 = 15.5 which rounds to 16
16 * 10 = 160
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
- Create a custom IAM role
- Associate the IAM role with EC2 instances
- Install Cloud Watch agent on EC2 instances
- Create log groups in Cloud Watch logs through the console & a CloudWatch agent configuration file
- Use filters to search for 404 errors
What is the issue with “aws Dynamodb delete-item”?
CLI commands must all be lower case
What is the issue with:
“ProductCategory IN (cat1) and (Price between :lo and :high)”
Missing colon before cat1