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

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 48 discussion

A solutions architect has developed a web application that uses an Amazon API Gateway Regional endpoint and an AWS Lambda function. The consumers of the web application are all close to the AWS Region where the application will be deployed. The Lambda function only queries an Amazon Aurora MySQL database. The solutions architect has configured the database to have three read replicas.

During testing, the application does not meet performance requirements. Under high load, the application opens a large number of database connections. The solutions architect must improve the application’s performance.

Which actions should the solutions architect take to meet these requirements? (Choose two.)

  • A. Use the cluster endpoint of the Aurora database.
  • B. Use RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database.
  • C. Use the Lambda Provisioned Concurrency feature.
  • D. Move the code for opening the database connection in the Lambda function outside of the event handler.
  • E. Change the API Gateway endpoint to an edge-optimized endpoint.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
masetromain
Highly Voted 1 year, 10 months ago
Selected Answer: BD
The correct answer is B and D. B. Using RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database can help improve the performance of the application by reducing the number of connections opened to the database. RDS Proxy manages the connection pool and routes incoming connections to the available read replicas, which can help with connection management and reduce the number of connections that need to be opened and closed. D. Moving the code for opening the database connection in the Lambda function outside of the event handler can help to improve the performance of the application by allowing the database connection to be reused across multiple requests. This avoids the need to open and close a new connection for each request, which can be time-consuming and resource-intensive.
upvoted 47 times
masetromain
1 year, 10 months ago
A. Using the cluster endpoint of the Aurora database instead of the reader endpoint would not help improve performance in this case, because the solution architect is already using read replicas to offload read traffic from the primary instance. C. Using the Lambda Provisioned Concurrency feature would not help improve performance in this case, as the problem is related to the number of connections to the database, not the number of instances running the Lambda function. E. Changing the API Gateway endpoint to an edge-optimized endpoint would not help improve performance in this case, as the problem is related to the number of connections to the database, not the location of the API Gateway endpoint.
upvoted 13 times
...
...
amministrazione
Most Recent 2 months, 3 weeks ago
B. Use RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database. D. Move the code for opening the database connection in the Lambda function outside of the event handler.
upvoted 1 times
...
Malcnorth59
6 months ago
Selected Answer: BD
The issue is with the number of database connections, thee are the only two changes that would impact the number of concurrent DB connections.
upvoted 1 times
...
gofavad926
8 months, 1 week ago
Selected Answer: BD
B and D
upvoted 1 times
...
totten
1 year, 1 month ago
Selected Answer: BD
B. Use RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database. RDS Proxy helps manage and efficiently pool database connections, reducing the number of database connections required by the application. It helps improve performance and reduces the load on the database. D. Move the code for opening the database connection in the Lambda function outside of the event handler. By reusing database connections, you can reduce the overhead of opening and closing connections for each Lambda invocation. You can use the Lambda execution context to keep the database connection open and reuse it across multiple requests within the same execution context.
upvoted 3 times
...
NikkyDicky
1 year, 4 months ago
Selected Answer: BD
BD for sure
upvoted 1 times
...
mfsec
1 year, 7 months ago
Selected Answer: BD
RDS proxy + Lambda function
upvoted 4 times
...
dev112233xx
1 year, 8 months ago
Selected Answer: BD
RDX proxy & connecting outside the handler method is up to 5 times faster than connecting inside.
upvoted 3 times
...
kiran15789
1 year, 8 months ago
Selected Answer: BD
he Lambda function only queries an Amazon Aurora MySQL database- so i would reject option C
upvoted 2 times
...
God_Is_Love
1 year, 8 months ago
This may be too logical answer :-) - Setting up RDS proxy will help connection pooling, So B is one answer. Now C vs D This question focuses on serverless solutions and best practices of lambda. and question hints that lambda only contains simple code.so lambda concurrency improvements may not be be the cause for performance issues detected while testing, and guess what - app is still in testing phase. so code might have a flaw can be reviewed and changed as per lambda best practices - https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html. I choose B and D
upvoted 3 times
...
moota
1 year, 9 months ago
Selected Answer: BD
According to ChatGPT, By reusing the same database connection across multiple invocations of the function, you can reduce the number of database connections that are opened and closed, which can help conserve resources and reduce the risk of running into database connection limits.
upvoted 2 times
...
Amac1979
1 year, 9 months ago
BD https://awstut.com/en/2022/04/30/connect-to-rds-outside-of-lambda-handler-method-to-improve-performance-en/
upvoted 4 times
...
masssa
1 year, 10 months ago
B/C lambda provisioned concurrency and RDS proxy are mentioned in same page. https://quintagroup.com/blog/aws-lambda-provisioned-concurrency
upvoted 1 times
...
Untamables
1 year, 10 months ago
Selected Answer: BC
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.howitworks.html https://docs.aws.amazon.com/lambda/latest/dg/provisioned-concurrency.html
upvoted 1 times
...
jhonivy
1 year, 10 months ago
B/C Provisioned Concurrency needed: https://www.reddit.com/r/aws/comments/gcwtqt/lambda_provisioned_concurrency_with_aurora/ With connection Pool, no to worry D
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 ...