Question

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

A logistics enterprise is refactoring its legacy package tracking and routing service into a serverless architecture on AWS. The application will receive high-volume, bursty updates via Amazon API Gateway, which triggers an AWS Lambda function. This function must query and update shipment status in an Amazon Aurora PostgreSQL database deployed within private subnets of a VPC. The Lambda function also needs to connect to an external third-party traffic routing API via the public internet to calculate delivery times. The solution must ensure high availability, scale efficiently under load without exhausting database connection pools, and secure outbound internet access. Which TWO actions should a Solutions Architect take to design a solution that meets these requirements?

  1. Deploy an Amazon RDS Proxy in the private subnets of the VPC to manage the database connection pooling, and configure the Lambda function to connect to the database via the proxy endpoint.Answer
  2. Deploy redundant NAT Gateways across multiple Availability Zones in the public subnets, and configure the route tables of the Lambda function's private subnets to route internet-bound traffic through them.Answer
  3. C
    Deploy a single NAT Gateway in one public subnet, and configure the route tables of the Lambda function's private subnets across all Availability Zones to route outbound internet traffic through this gateway.
  4. D
    Use the default AWS-managed KMS key (aws/secretsmanager) to encrypt the database credentials in AWS Secrets Manager, and grant the Lambda execution role cross-account permissions to read and decrypt with this key.
  5. E
    Allow the Lambda function to scale dynamically without setting any reserved concurrency limits to guarantee that all bursty shipment updates are processed with zero latency.
  6. F
    Configure a basic rolling deployment strategy in AWS CloudFormation to update the Lambda function, relying on manual monitoring instead of automated CloudWatch alarm rollbacks to reduce deployment overhead.

Answer

Deploy an Amazon RDS Proxy in the private subnets of the VPC to manage database connection pooling, and deploy redundant NAT Gateways across multiple Availability Zones in the public subnets to handle internet-bound traffic from the private subnets.
Deploying an Amazon RDS Proxy manages connection scaling dynamically, ensuring that the database does not crash under high connection volume. Deploying redundant NAT Gateways across multiple Availability Zones provides fault-tolerant outbound connectivity, ensuring the Lambda function can reliably query the external API.

Step-by-Step Solution

1
Evaluate the database scaling constraints under serverless workloads.
Identify that rapid scaling of the Lambda function will saturate database connections.
Amazon RDS Proxy pools database connections, shielding the Aurora PostgreSQL database from connection depletion.
2
Design the network topology for private resources requiring internet access.
Identify that the Lambda function must be placed in a VPC to communicate with the database, and needs a path to the internet for the third-party API.
Routing internet-bound traffic from private subnets requires NAT Gateways deployed in public subnets.
3
Ensure the design achieves high availability.
Choose redundant NAT Gateways in multiple Availability Zones over a single NAT Gateway.
A single NAT Gateway is a single point of failure, whereas multi-AZ NAT Gateways ensure connectivity persists during an Availability Zone outage.

Key Concept

Designing secure, serverless architectures with high availability and database connection pooling in a VPC.
Rate this question