A pharmaceutical company is modernizing its clinical trial drug dispatch API on AWS. The system must process high-volume, bursty request patterns from external medical partners. The backend database is hosted on an Amazon Aurora PostgreSQL DB cluster inside a VPC. The API must be private, accessible only from the partners' on-premises networks via an existing AWS Direct Connect connection. To prevent database connection exhaustion during peak traffic, the architecture must incorporate an Amazon RDS Proxy. The security policy dictates that database credentials must be encrypted using a Customer Managed Key (CMK) in AWS KMS, and the Lambda functions must be restricted from accessing the public internet.
Which TWO actions should a solutions architect take to meet these requirements?
- Create an Amazon API Gateway private REST API and configure an interface VPC endpoint for API Gateway in the VPC. Attach an API Gateway resource policy to the private API that allows access only from the interface VPC endpoint ID, and route on-premises traffic through the Direct Connect connection to the private IP addresses of the VPC endpoint.Answer
- Create an Amazon Secrets Manager secret containing the database credentials, encrypted with a Customer Managed Key (CMK) in AWS KMS. Configure the RDS Proxy to use this secret, and grant the Lambda execution role and RDS Proxy role permissions to retrieve the secret and decrypt it using the CMK.Answer
- CDeploy the Lambda functions in private subnets with a route table directing outbound internet traffic to a single NAT Gateway to facilitate the database connection, while removing all concurrency limits on the Lambda functions to allow maximum scaling.
- DStore the database credentials in AWS Secrets Manager using the default AWS-managed KMS key (aws/secretsmanager), and configure the Secrets Manager resource policy to grant the cross-account Lambda execution role decryption permissions.
- EConfigure the Lambda functions to connect directly to the database writer endpoint, and set the reserved concurrency of the Lambda functions to zero to protect other critical serverless workloads in the AWS account from resource exhaustion.