A retail corporation is modernizing its on-premises inventory management backend by migrating to Amazon Aurora PostgreSQL. A serverless application using Amazon API Gateway and AWS Lambda will ingest high-frequency updates from partner supply-chain systems. The partner systems connect to the VPC using AWS Direct Connect.
The architecture must meet the following requirements:
- API traffic from partners must remain entirely private without traversing the public internet.
- Partner requests must be authenticated using OAuth2 tokens validated by a Lambda authorizer against an external Identity Provider (IdP) on the public internet.
- Database connection scaling must be managed efficiently.
- High-volume surges in inventory API traffic must not exhaust the regional account concurrency pool, which would throttle other critical applications.
- Credentials must be encrypted using AWS KMS, with the key policy configured to delegate management to a central security team.
Which architecture meets these requirements while aligning with AWS best practices?
- Deploy a Private API Gateway with an Interface VPC Endpoint. Configure the inventory Lambda function in the VPC to use Amazon RDS Proxy. Set Reserved Concurrency on the inventory Lambda function. Run the Lambda authorizer inside private subnets across multiple Availability Zones, routing outbound traffic through a NAT Gateway in each Availability Zone to validate tokens against the external Identity Provider. Encrypt database credentials using a Customer Managed Key (CMK) with a customized key policy.Answer
- BDeploy a Private API Gateway with an Interface VPC Endpoint. Configure the inventory Lambda function in the VPC to use Amazon RDS Proxy. Set Reserved Concurrency on the inventory Lambda function. Run the Lambda authorizer inside private subnets, routing all outbound traffic through a single NAT Gateway in a single Availability Zone to validate tokens against the external Identity Provider. Encrypt database credentials using a Customer Managed Key (CMK) with a customized key policy.
- CDeploy a Private API Gateway with an Interface VPC Endpoint. Configure the inventory Lambda function in the VPC to use Amazon RDS Proxy. Configure Provisioned Concurrency on the inventory Lambda function to handle initial traffic surges, without setting Reserved Concurrency limits. Run the Lambda authorizer inside private subnets across multiple Availability Zones, routing outbound traffic through a NAT Gateway in each Availability Zone. Encrypt database credentials using a Customer Managed Key (CMK) with a customized key policy.
- DDeploy a Private API Gateway with an Interface VPC Endpoint. Configure the inventory Lambda function in the VPC to use Amazon RDS Proxy. Set Reserved Concurrency on the inventory Lambda function. Run the Lambda authorizer inside private subnets across multiple Availability Zones, routing outbound traffic through a NAT Gateway in each Availability Zone. Encrypt database credentials using the default AWS-managed KMS key (aws/lambda) and modify its key policy to delegate administration to the central security team.