Question

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

A property management platform is modernizing its tenant building access logging system. The legacy application receives high-volume access event telemetry from IoT-enabled doors at peak hours, which causes database connection exhaustion on the backend Amazon RDS for PostgreSQL database. The database is located in a private VPC subnet. The platform requires the API endpoint to be accessible only from the corporate network over a private network connection. Which TWO actions should a solutions architect take to implement a serverless solution that meets these requirements? (Select TWO.)

  1. Configure a private REST API in Amazon API Gateway, deploy an Interface VPC Endpoint for API Gateway, and attach an API Gateway resource policy that allows access from the Interface VPC Endpoint.Answer
  2. Configure Amazon RDS Proxy for the RDS for PostgreSQL database, and update the AWS Lambda functions to connect using the RDS Proxy endpoint.Answer
  3. C
    Configure the AWS Lambda functions with high provisioned concurrency to manage database connection pooling and reuse connection streams during high-volume telemetry ingestion events.
  4. D
    Configure the AWS Lambda functions in the private subnets of a VPC, and direct outbound database traffic through a single NAT Gateway to ensure a static IP address for database firewall authorization.
  5. E
    Store the database credentials in AWS Secrets Manager, encrypt them using the default AWS-managed KMS key (aws/secretsmanager), and modify the key policy to allow cross-account access for the Lambda functions.

Answer

Configure a private REST API in Amazon API Gateway with an Interface VPC Endpoint and a resource policy, and deploy Amazon RDS Proxy to manage database connection pooling for the AWS Lambda functions.
The correct options involve configuring a private REST API in Amazon API Gateway with an Interface VPC Endpoint and resource policy, and using Amazon RDS Proxy. A private REST API restricts access to the VPC, and the resource policy secures the endpoint against unauthorized network access. Amazon RDS Proxy pools database connections, preventing the bursty Lambda functions from exhausting PostgreSQL connection limits.

Step-by-Step Solution

1
Analyze the database connection scaling issue.
Identify that AWS Lambda functions scale horizontally and open a new connection per concurrent execution, which easily exhausts PostgreSQL connection limits.
Understanding the connection pooling behavior of Lambda is necessary to select the right database proxying solution.
2
Evaluate solutions for database connection limits.
Select Amazon RDS Proxy, which sits between Lambda and the database to pool and reuse connections.
RDS Proxy resolves connection limit issues for PostgreSQL under high concurrency.
3
Analyze private access requirements for API Gateway.
Select a private REST API in Amazon API Gateway integrated with an Interface VPC Endpoint and a resource policy.
A private API Gateway ensures the endpoint is not exposed to the public internet and restricts access to requests coming from the VPC or corporate network over Direct Connect.

Key Concept

Serverless modernization of legacy relational database workloads using API Gateway private endpoints and RDS Proxy connection pooling.
Rate this question