SAP-C02 practice question 24 of 35
A solutions architect has developed a web application that uses an Amazon API Gateway Regional endpoint and an AWS Lambda function. The consumers of…
Full set: 689 questionsDomain Continuous Improvement for Existing Solutions
The primary performance issue is the large number of database connections opened by the Lambda function under high load, which can exhaust database resources. Amazon RDS Proxy is a fully managed, highly available database proxy that is designed to solve this problem. It establishes and manages a pool of database connections, allowing Lambda functions to reuse connections from the pool. This significantly reduces the stress on the database and improves scalability. Using the reader endpoint with RDS Proxy correctly directs read-only queries to the read replicas. Additionally, moving the database connection logic outside the Lambda function's event handler is a critical best practice. This allows the connection to be established during the execution environment's initialization phase and reused across multiple invocations, reducing the overhead and frequency of creating new connections.
A. The cluster endpoint directs traffic to the primary (writer) instance. Sending read-only queries here would bypass the read replicas, failing to utilize them and potentially overloading the writer.
C. Provisioned Concurrency reduces cold start latency by keeping function instances warm. It does not solve the underlying problem of connection exhaustion and could even worsen it by enabling more concurrent connections.
E. An edge-optimized API Gateway endpoint is for geographically distributed users. The scenario states users are close to the deployment Region, making the current Regional endpoint the more performant choice.
1. Amazon RDS Proxy: AWS Documentation
"Managing connections with Amazon RDS Proxy
" states
"RDS Proxy allows applications to pool and share connections established with the database. This improves database efficiency and application scalability... It is especially well-suited for serverless applications such as those built on AWS Lambda".
Source: AWS Documentation
Amazon RDS User Guide
"Using Amazon RDS Proxy
" "Managing connections with Amazon RDS Proxy."
2. Lambda Connection Management: AWS Documentation
"Best practices for working with AWS Lambda functions
" advises
"Initialize database connections outside of the function handler... subsequent invocations processed by the same instance of your function can reuse these resources."
Source: AWS Documentation
AWS Lambda Developer Guide
"Best practices for working with AWS Lambda functions
" "Manage database connections."
3. Aurora Endpoints: AWS Documentation explains that the reader endpoint provides load-balancing for read-only connections across Aurora Replicas. The cluster endpoint connects to the primary instance for write operations.
Source: AWS Documentation
Amazon Aurora User Guide
"Amazon Aurora connection management
" "Aurora endpoints."
4. API Gateway Endpoints: AWS Documentation clarifies that Regional endpoints are best for clients in the same AWS Region
while edge-optimized endpoints are better for geographically distributed clients.
Source: AWS Documentation
Amazon API Gateway Developer Guide
"Choosing an API Gateway API endpoint type to set up
" "Comparing edge-optimized and Regional API endpoints."
Keep practicing
Take the free SAP-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SAP-C02 practice questions
- Question 1A company runs an application in (he cloud that consists of a database and a website User…
- Question 2A company wants to migrate an Amazon Aurora MySQL DB cluster from an existing AWS account…
- Question 3A company is running a two-tier web-based application in an on-premises data center. The …
- Question 4A company is running a critical stateful web application on two Linux Amazon EC2 instance…
- Question 5A company plans to migrate a legacy on-premises application to AWS. The application is a …
- Question 6A company needs to migrate an on-premises SFTP site to AWS. The SFTP site currently runs …
