ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 357 - SAP-C02 discussion

Report
Export

An ecommerce company runs an application on AWS. The application has an Amazon API Gateway API that invokes an AWS Lambda function. The data is stored in an Amazon RDS for PostgreSQL DB instance.

During the company's most recent flash sale, a sudden increase in API calls negatively affected the application's performance. A solutions architect reviewed the Amazon CloudWatch metrics during that time and noticed a significant increase in Lambda invocations and database connections. The CPU utilization also was high on the DB instance.

What should the solutions architect recommend to optimize the application's performance?

A.
Increase the memory of the Lambda function. Modify the Lambda function to close the database connections when the data is retrieved.
Answers
A.
Increase the memory of the Lambda function. Modify the Lambda function to close the database connections when the data is retrieved.
B.
Add an Amazon ElastiCache for Redis cluster to store the frequently accessed data from the RDS database.
Answers
B.
Add an Amazon ElastiCache for Redis cluster to store the frequently accessed data from the RDS database.
C.
Create an RDS proxy by using the Lambda console. Modify the Lambda function to use the proxy endpoint.
Answers
C.
Create an RDS proxy by using the Lambda console. Modify the Lambda function to use the proxy endpoint.
D.
Modify the Lambda function to connect to the database outside of the function's handler. Check for an existing database connection before creating a new connection.
Answers
D.
Modify the Lambda function to connect to the database outside of the function's handler. Check for an existing database connection before creating a new connection.
Suggested answer: C

Explanation:

This option will optimize the application's performance by reducing the overhead of opening and closing database connections for each Lambda invocation.An RDS proxy is a fully managed database proxy for Amazon RDS that makes applications more scalable, more resilient to database failures, and more secure1.It allows applications to pool and share connections established with the database, improving database efficiency and application scalability1.By creating an RDS proxy by using the Lambda console, you can easily configure your Lambda function to use the proxy endpoint instead of the direct database endpoint2. This will enable your Lambda function to reuse existing connections from the proxy's connection pool, reducing the latency and CPU utilization caused by establishing new connections for each invocation.It will also prevent connection saturation or exhaustion on the database, which can degrade performance or cause errors3.


asked 16/09/2024
Carmina Medel
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first