Question

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

A logistics company is modernizing its package tracking update microservice by refactoring it to a serverless architecture. The new design uses Amazon API Gateway and AWS Lambda to write tracking updates to a shared Amazon Aurora PostgreSQL database that serves multiple other critical company applications. During load testing, the backend database experiences connection exhaustion, and the API Gateway begins returning 429 Too Many Requests errors because the tracking function consumes the entire regional Lambda execution limit, impacting other serverless applications. Which of the following architectural modifications best resolves both the database connection exhaustion and the regional Lambda execution throttling?

  1. Implement Amazon RDS Proxy between the Lambda function and the Aurora PostgreSQL database, and configure a reserved concurrency limit on the tracking Lambda function.Answer
  2. B
    Enable Provisioned Concurrency on the tracking Lambda function to handle the sudden burst of incoming requests, and directly scale the Aurora PostgreSQL database instance size.
  3. C
    Implement Amazon RDS Proxy between the Lambda function and the Aurora PostgreSQL database, and route all outbound Lambda traffic to the VPC through a single NAT Gateway.
  4. D
    Deploy Amazon RDS Proxy, store the database credentials in AWS Secrets Manager, and encrypt them with the AWS-managed KMS key (aws/secretsmanager) to delegate access to the Lambda function in a separate AWS account.

Answer

Implement Amazon RDS Proxy between the AWS Lambda function and the Amazon Aurora PostgreSQL database to manage the connection pool, and configure a reserved concurrency limit on the high-volume Lambda function to prevent it from exhausting both database connections and the regional account execution pool.
The correct architecture uses Amazon RDS Proxy to pool database connections, which addresses the connection exhaustion issue on Amazon Aurora PostgreSQL. Additionally, configuring reserved concurrency on the tracking Lambda function sets a hard limit on its concurrent executions. This ensures it does not scale out to consume the entire regional concurrency pool, resolving the throttling issue for other serverless applications in the account.

Step-by-Step Solution

1
Analyze the requirements and current issues: database connection exhaustion and regional Lambda concurrency throttling.
Identified the need to pool database connections and limit the concurrency of the tracking Lambda function.
This target isolation prevents database resource exhaustion and keeps other regional functions operational.
2
Select a database connection management solution.
Chose Amazon RDS Proxy to intercept and pool database connections.
RDS Proxy scales database connection pools automatically and handles transient Lambda connections efficiently.
3
Select a concurrency management solution for the Lambda function.
Configured Reserved Concurrency on the tracking Lambda function.
Reserved concurrency reserves a portion of the account's pool and acts as a hard limit, preventing the function from taking over the entire regional capacity.

Key Concept

Using Amazon RDS Proxy for connection pooling and AWS Lambda reserved concurrency to limit scaling limits in serverless architectures.
Estimated Time:1m 30s
Rate this question