A financial services company is modernizing its legacy reporting system. The new architecture will use an Amazon API Gateway REST API to receive JSON report requests and route them to an AWS Lambda function. The Lambda function processes the reports and queries an Amazon RDS for PostgreSQL database located in a private subnet. The report requests are bursty, occasionally generating thousands of concurrent requests within a few minutes. Additionally, the Lambda function needs to call external third-party compliance APIs to validate the report metadata.
Which TWO of the following configurations should the solutions architect implement to ensure a secure, reliable, and scalable serverless architecture? (Select TWO.)
- Deploy Amazon RDS Proxy in the private subnets to pool database connections, and configure reserved concurrency on the Lambda function to prevent overwhelming the PostgreSQL database during traffic bursts.Answer
- Deploy NAT Gateways in each Availability Zone where the Lambda function is configured to run, and update the private subnet route tables to direct outbound traffic to the local NAT Gateway.Answer
- CDeploy a single NAT Gateway in a single Availability Zone, and update the route tables of all private subnets to route outbound traffic through this single NAT Gateway to reduce NAT gateway hourly charges.
- DAllow the Lambda function to scale dynamically using the default regional concurrency pool without setting any reserved concurrency limits, relying on database-level connection timeouts to handle peaks.
- EConfigure the system to encrypt database credentials in AWS Secrets Manager using the default AWS-managed KMS key (aws/secretsmanager), and update its key policy to delegate read permissions to a cross-account IAM role used by the Lambda function.
Answer
Deploy Amazon RDS Proxy in the private subnets to pool database connections, configure reserved concurrency on the Lambda function, and deploy NAT Gateways in each Availability Zone where the Lambda function runs to route outbound traffic.
Deploying Amazon RDS Proxy pools and reuses database connections, preventing the PostgreSQL database from crashing due to connection limits under high-volume spikes. Configuring reserved concurrency prevents the Lambda function from scaling excessively, which protects the database and safeguards regional concurrency. Setting up multiple NAT Gateways ensures redundant outbound routes for API validations in case of an Availability Zone outage.
Step-by-Step Solution
Key Concept
Modernizing legacy workloads to serverless requires managing outbound internet access, database connection scaling, and function concurrency to prevent regional throttling and database exhaustion.