exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 15 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 15
Topic #: 1
[All AWS Certified Developer Associate Questions]

A company has point-of-sale devices across thousands of retail shops that synchronize sales transactions with a centralized system. The system includes an
Amazon API Gateway API that exposes an AWS Lambda function. The Lambda function processes the transactions and stores the transactions in Amazon RDS for MySQL. The number of transactions increases rapidly during the day and is near zero at night.
How can a developer increase the elasticity of the system MOST cost-effectively?

  • A. Migrate from Amazon RDS to Amazon Aurora MySQL. Use an Aurora Auto Scaling policy to scale road replicas based on CPU consumption.
  • B. Migrate from Amazon RDS to Amazon Aurora MySQL. Use an Aurora Auto Scaling policy to scale read replicas based on the number of database connections.
  • C. Create an Amazon Simple Queue Service (Amazon SQS) queue. Publish transactions to the queue. Set the queue to invoke the Lambda function. Turn on enhanced fanout for the Lambda function.
  • D. Create an Amazon Simple Queue Service (Amazon SQS) queue. Publish transactions to the queue. Set the queue to invoke the Lambda function. Set the reserved concurrency of the Lambda function to be less than the number of database connections.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JAMG54
Highly Voted 2 years, 7 months ago
A and B are for read problem, nor for write. C its not possible because enhanced fanout its for kinesis D is the most probably
upvoted 25 times
...
SuperPiski
Highly Voted 2 years, 7 months ago
Selected Answer: D
Read replicas are for read... transactions means that something have to be written. There is no such thing of fanout for lambda. This lead to D. Because we've limited the number of concurrent lambdas to be lower than the number of connections, the system will run with no problems
upvoted 7 times
Syre
2 years ago
D is very incorrect, D would limit the number of concurrent executions of the Lambda function, potentially creating a bottleneck and reducing the throughput of the system. A and B are wrong as they are for reads. C is the answer
upvoted 2 times
vipyodha
1 year, 2 months ago
option D is better fit than C: in option c the reserved concurrency of lambda is set lower than database connection, that means database write operation will not throttle , while at lambda there is sqs behind lambda so for huge number of request sqs will hundle and will not throttle.
upvoted 2 times
...
...
...
avinashk99
Most Recent 3 months ago
Selected Answer: D
"enhanced fanout" is only for Kinesis-Lambda integration, not for SQS. Therefore answer D is best
upvoted 1 times
...
sumanshu
4 months, 2 weeks ago
Selected Answer: D
D) Correct - By adding an SQS queue between the point-of-sale devices and the Lambda function, you can handle spikes in transaction volume without overwhelming the Lambda function or the RDS database. Limiting the concurrency of the Lambda function ensures that the number of simultaneous connections to the database does not exceed what the RDS instance can handle.
upvoted 1 times
sumanshu
4 months, 2 weeks ago
A & B - Eliminated - because they focus on scaling read replicas, which is not suitable for a workload dominated by write operations
upvoted 1 times
sumanshu
4 months, 2 weeks ago
Scaling based on read replicas only improves the performance of read-heavy workloads. This is irrelevant for the application's write-heavy workload, where sales transactions need to be written to the database.
upvoted 1 times
sumanshu
4 months, 2 weeks ago
C) Eliminated - Enhanced fanout is specific to Amazon Kinesis Data Streams, not SQS. Even if enhanced fanout were relevant, it would not address database connection limits, which are the critical bottleneck here.
upvoted 1 times
...
...
...
...
thucta96dn
6 months ago
Selected Answer: B
B is seamly correct
upvoted 1 times
...
trainee46
7 months, 1 week ago
Selected Answer: D
A&B are out because the aplpication writes to the DB, therefore read replicas do not help. C ist out because enahced fan out is a kinesis feature D solves the issue. Setting the concurrency limit to the number of database connections ensures that all running lambdas can successfuly write to the database.
upvoted 1 times
...
itsonlyjit1990
11 months, 1 week ago
B. auto scalling is cost effective.
upvoted 1 times
...
gilleep_17
1 year, 3 months ago
option c Using an Amazon SQS queue to buffer transactions and then invoking the Lambda function can help in managing the varying transaction load. Turning on enhanced fanout for the Lambda function allows it to scale more effectively by processing records in parallel.
upvoted 1 times
...
AsmaZoheb
1 year, 3 months ago
Selected Answer: C
Option C leverages the scalability of SQS and enhanced fanout for Lambda, making it the most cost-effective and suitable choice for handling varying transaction loads efficiently.
upvoted 1 times
...
kashtelyan
1 year, 6 months ago
Selected Answer: C
C is correct because you are turning Kinesis enhanced fan out FORFORFOR Lambda not Lambda fanout itself. The scenario is exactly stating this. https://aws.amazon.com/about-aws/whats-new/2018/11/aws-lambda-supports-kinesis-data-streams-enhanced-fan-out-and-http2/
upvoted 1 times
...
dexdinh91
1 year, 6 months ago
Selected Answer: B
reserved concurrency is not cost effectively, D is not correct
upvoted 1 times
...
CarlosC
1 year, 9 months ago
It can't be C. Enhanced fan-out is a feature of Amazon Kinesis Data Streams, not SQS. Enhanced fan-out allows multiple consumers to receive data from a Kinesis data stream concurrently. D is the most probable
upvoted 2 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: D
Again, tricky question! I was for B but if we think about that, it is written "stores the transactions in Amazon RDS" and the B option is only about read replicas. So I changed my mind and now I will go for D as well. It makes sense to create a Queue before process the transactions and publish messages to the SQS Queue and attach a lambda function to perform the transaction. Also, set the reserved concurrency (max number of parallel invocations for a function) less than to the number of DB connections is a brilliant idea to avoid concurrency issues with the function.
upvoted 6 times
...
siner
1 year, 10 months ago
Selected Answer: B
keyword is "increase the elasticity of the system MOST cost-effectively" we can find relative keyword auth-scaling
upvoted 1 times
...
rudyyang2001
1 year, 11 months ago
Selected Answer: D
Should be d
upvoted 1 times
...
imvb88
1 year, 11 months ago
Selected Answer: D
transactions -> need write function. A, B only for read function -> out C: enhanced fan-out is feature of Kinesis. Lambda does support it but only with Kinesis, not with SQS -> out D make sense since SQS + Lambda is a pattern, plus setting reserved concurrency limit makes sense
upvoted 2 times
...
MrTee
2 years ago
Selected Answer: C
This approach uses an Amazon SQS queue to decouple the point-of-sale devices from the centralized system, allowing for better scalability and reliability. The queue can handle large volumes of transactions during peak periods and ensure that the transactions are processed in a timely manner by invoking the Lambda function. Using enhanced fanout for the Lambda function can further increase its elasticity by allowing multiple instances to process messages concurrently. This is the most cost-effective approach as it doesn't require any changes to the existing RDS database or the use of expensive Aurora Auto Scaling.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago