ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 180 - DOP-C02 discussion

Report
Export

A DevOps engineer is building an application that uses an AWS Lambda function to query an Amazon Aurora MySQL DB cluster. The Lambda function performs only read queries. Amazon EventBridge events invoke the Lambda function.

As more events invoke the Lambda function each second, the database's latency increases and the database's throughput decreases. The DevOps engineer needs to improve the performance of the application.

Which combination of steps will meet these requirements? (Select THREE.)

A.
Use Amazon RDS Proxy to create a proxy. Connect the proxy to the Aurora cluster reader endpoint. Set a maximum connections percentage on the proxy.
Answers
A.
Use Amazon RDS Proxy to create a proxy. Connect the proxy to the Aurora cluster reader endpoint. Set a maximum connections percentage on the proxy.
B.
Implement database connection pooling inside the Lambda code. Set a maximum number of connections on the database connection pool.
Answers
B.
Implement database connection pooling inside the Lambda code. Set a maximum number of connections on the database connection pool.
C.
Implement the database connection opening outside the Lambda event handler code.
Answers
C.
Implement the database connection opening outside the Lambda event handler code.
D.
Implement the database connection opening and closing inside the Lambda event handler code.
Answers
D.
Implement the database connection opening and closing inside the Lambda event handler code.
E.
Connect to the proxy endpoint from the Lambda function.
Answers
E.
Connect to the proxy endpoint from the Lambda function.
F.
Connect to the Aurora cluster endpoint from the Lambda function.
Answers
F.
Connect to the Aurora cluster endpoint from the Lambda function.
Suggested answer: A, C, E

Explanation:

Short To improve the performance of the application, the DevOps engineer should use Amazon RDS Proxy, implement the database connection opening outside the Lambda event handler code, and connect to the proxy endpoint from the Lambda function.

Amazon RDS Proxy is a fully managed, highly available database proxy for Amazon Relational Database Service (RDS) that makes applications more scalable, more resilient to database failures, and more secure1. By using Amazon RDS Proxy, the DevOps engineer can reduce the overhead of opening and closing connections to the database, which can improve latency and throughput2.

The DevOps engineer should connect the proxy to the Aurora cluster reader endpoint, which allows read-only connections to one of the Aurora Replicas in the DB cluster3. This can help balance the load across multiple read replicas and improve performance for read-intensive workloads4.

The DevOps engineer should implement the database connection opening outside the Lambda event handler code, which means using a global variable to store the database connection object5. This can enable connection reuse across multiple invocations of the Lambda function, which can reduce latency and improve performance.

The DevOps engineer should connect to the proxy endpoint from the Lambda function, which is a unique URL that represents the proxy. This can allow the Lambda function to access the database through the proxy, which can provide benefits such as connection pooling, load balancing, failover handling, and enhanced security.

The other options are incorrect because:

Implementing database connection pooling inside the Lambda code is unnecessary and redundant when using Amazon RDS Proxy, which already provides connection pooling as a service.

Implementing the database connection opening and closing inside the Lambda event handler code is inefficient and costly, as it can increase latency and consume more resources for each invocation of the Lambda function.

Connecting to the Aurora cluster endpoint from the Lambda function is not optimal for read-only queries, as it can direct traffic to either the primary instance or one of the Aurora Replicas in the DB cluster. This can result in inconsistent performance and potential conflicts with write operations on the primary instance.

asked 16/09/2024
sujan bolla
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first