A municipal transit authority is modernizing its on-premises ticketing system by migrating to a serverless architecture on AWS. The application will expose a public API for third-party transit applications to query real-time schedule updates and purchase tickets, which is expected to experience sudden, massive spikes in traffic during rush hours. The backend database is an Amazon RDS PostgreSQL DB instance situated in private subnets within a VPC. The new design must scale dynamically to handle rush-hour spikes, protect the database from connection exhaustion, ensure that traffic bursts do not throttle other critical serverless workloads in the AWS account, and encrypt all data at rest using customer-managed keys (CMKs). Which architectural design meets these requirements?
- Deploy an Amazon API Gateway REST API. Configure an AWS Lambda function integrated with the API Gateway, deploying it inside the VPC private subnets. Create an Amazon RDS Proxy in the private subnets to manage connections to the RDS PostgreSQL database. Configure reserved concurrency on the Lambda function, and encrypt the RDS database and Lambda environment variables using a KMS customer managed key.Cevap
- BDeploy an Amazon API Gateway REST API. Configure an AWS Lambda function integrated with the API Gateway, deploying it inside the VPC private subnets. Configure the Lambda function to connect directly to the RDS PostgreSQL database. Do not configure any concurrency limits on the Lambda function to allow it to scale dynamically to maximum regional limits, and encrypt the database using the default AWS-managed KMS key 'aws/rds'.
- CDeploy an Amazon API Gateway REST API. Configure an AWS Lambda function integrated with the API Gateway, deploying it inside the VPC private subnets. Create an Amazon RDS Proxy in the private subnets to manage database connections. Route all outbound Lambda traffic to the internet through a single NAT Gateway located in one public subnet, and encrypt the RDS database using the default AWS-managed KMS key 'aws/rds'.
- DDeploy an Amazon API Gateway REST API. Configure an AWS Lambda function integrated with the API Gateway, deploying it inside the VPC private subnets. Create an Amazon RDS Proxy in the private subnets. Configure provisioned concurrency on the Lambda function to handle the traffic spikes. Use AWS CodeDeploy with a linear deployment strategy to update the Lambda function without configuring CloudWatch rollback alarms, and encrypt the database using a KMS customer managed key.