Question

Difficulty: MediumModernizing Workloads with Serverless Architectures (Lambda and API Gateway)

A retail company is modernizing its catalog query service by refactoring the legacy application to use Amazon API Gateway and AWS Lambda. The application queries an Amazon RDS MySQL database. During promotional events, traffic is expected to spike from 100100 requests per second (RPS) to over 5,0005,000 RPS within a few seconds. The Solutions Architect must ensure that database connections are not exhausted and that the traffic burst does not exhaust the AWS account's regional concurrent execution limit, which would throttle other critical services. The API must also only be accessible by the company's internal web application running in a separate VPC.

Which combination of steps should the Solutions Architect implement to meet these requirements? (Select TWO.)

  1. Configure Amazon RDS Proxy for the database, configure the Lambda function to connect through the RDS Proxy endpoint, and configure a reserved concurrency limit on the Lambda function.Answer
  2. Deploy an Amazon API Gateway private API, create an interface VPC endpoint (AWS PrivateLink) for API Gateway in the application VPC, and configure a resource policy on the private API that allows access only from the VPC endpoint.Answer
  3. C
    Establish direct database connections from the Lambda function to the database, and leave the Lambda function concurrency settings at default to allow maximum auto-scaling capacity to absorb the bursts.
  4. D
    Configure the Lambda function to send write traffic to the primary database instance and read traffic to the standby instance of the Multi-AZ deployment to distribute the query load.
  5. E
    Deploy a single NAT Gateway in one public subnet of the application VPC, and route all outbound Lambda traffic through this NAT Gateway to establish static IP validation for database security.
  6. F
    Use AWS CodeDeploy to configure a linear deployment strategy with a 10% traffic shift every minute, and configure the Lambda function to bypass VPC integration to eliminate cold-start latency.

Answer

Configure Amazon RDS Proxy, apply a reserved concurrency limit to the Lambda function, deploy a private API in Amazon API Gateway accessed via an interface VPC endpoint, and restrict access using a resource policy.
The correct options are the ones implementing Amazon RDS Proxy and Lambda reserved concurrency, along with an Amazon API Gateway private API with an interface VPC endpoint. RDS Proxy resolves database connection limits by pooling and sharing connections, while a reserved concurrency limit on the Lambda function prevents it from consuming the entire account's concurrency pool and throttling other functions. A private API Gateway endpoint combined with an interface VPC endpoint and an API resource policy keeps all client traffic inside the private AWS network.

Step-by-Step Solution

1
Address database connection pooling and scale constraints.
Configure Amazon RDS Proxy between the Lambda function and the RDS MySQL database.
RDS Proxy pools and shares database connections, preventing the thousands of concurrent Lambda executions during flash sales from exhausting the MySQL database connection limits.
2
Protect the AWS account's regional concurrent execution limit.
Set a reserved concurrency limit on the Lambda function.
A reserved concurrency limit guarantees that the function has a maximum limit it cannot exceed, preventing it from consuming the entire regional concurrency pool and throttling other services.
3
Secure the API access path to be internal-only.
Deploy a private API Gateway endpoint and access it through an interface VPC endpoint (AWS PrivateLink) inside the application VPC, with an API resource policy restricting access to this endpoint.
This keeps all traffic within the AWS private network, satisfying the requirement to prevent traversal of the public internet.

Key Concept

Scaling serverless workloads securely and reliably with Amazon API Gateway and AWS Lambda while protecting downstream resources like Amazon RDS.
Rate this question