Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

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

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 103 discussion

An ecommerce website uses an AWS Lambda function and an Amazon RDS for MySQL database for an order fulfillment service. The service needs to return order confirmation immediately.

During a marketing campaign that caused an increase in the number of orders, the website's operations team noticed errors for “too many connections” from Amazon RDS. However, the RDS DB cluster metrics are healthy. CPU and memory capacity are still available.

What should a developer do to resolve the errors?

  • A. Initialize the database connection outside the handler function. Increase the max_user_connections value on the parameter group of the DB cluster. Restart the DB cluster.
  • B. Initialize the database connection outside the handler function. Use RDS Proxy instead of connecting directly to the DB cluster.
  • C. Use Amazon Simple Queue Service (Amazon SQS) FIFO queues to queue the orders. Ingest the orders into the database. Set the Lambda function's concurrency to a value that equals the number of available database connections.
  • D. Use Amazon Simple Queue Service (Amazon SQS) FIFO queues to queue the orders. Ingest the orders into the database. Set the Lambda function's concurrency to a value that is less than the number of available database connections.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
MrTee
Highly Voted 1 year, 6 months ago
Selected Answer: B
Use an RDS Proxy instead of connecting directly to the DB cluster.
upvoted 13 times
...
hanJR
Highly Voted 1 year, 6 months ago
B https://aws.amazon.com/blogs/compute/using-amazon-rds-proxy-with-aws-lambda/
upvoted 7 times
...
Saudis
Most Recent 2 months ago
Selected Answer: B
The key word is increase in the number of orders, so the proxy can help in this stuation
upvoted 1 times
...
65703c1
5 months, 3 weeks ago
Selected Answer: B
B is the correct answer.
upvoted 1 times
...
maurice2005
8 months ago
Selected Answer: C
Option B only improve the execution time of lambda and decrease the delay from request to database. It might even worsen the situation because database can get more concurrent connection. RDS Proxy also doesn't limit the number of connections, even if so it will generate errors for lambda. The only way is to throttle the requests using SQS until a connection gets released. Why everyone thinks ChatGPT has the ultimate answer????!!!!
upvoted 2 times
nbxyzd
1 week, 4 days ago
Read carefully: "the service needs to return order confirmation *immediately*." This means that asynchronous solutions like SQS does NOT meet the requirement.
upvoted 1 times
...
...
SerialiDr
10 months ago
Selected Answer: B
AWS RDS Proxy is designed to manage and pool database connections, which makes it ideal for environments with highly variable and potentially high-volume database access patterns, such as those driven by Lambda functions. It helps to reduce the number of direct connections to the database and can efficiently manage the connections from the pool.
upvoted 2 times
...
hmdev
1 year, 2 months ago
Selected Answer: B
We can use an RDS proxy to handle a lot of connections. We are choosing this option because the load on the RDS is normal. If the RDS was unable to handle loads, we would've checked other options like queues or transactions.
upvoted 2 times
...
eberhe900
1 year, 4 months ago
Selected Answer: B
https://repost.aws/questions/QULXSqEPGbQx6qiyBa1D1Udg/lambda-to-db-connectivity-best-practices
upvoted 1 times
...
loctong
1 year, 5 months ago
Selected Answer: B
Using an RDS Proxy can manage connections to the RDS instance, reducing the overhead of establishing new connections and thereby preventing the "too many connections" error.
upvoted 2 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 ...