Soru

Zorluk: ZorModernizing Workloads with Serverless Architectures (Lambda and API Gateway)

A financial services company is modernizing its legacy transaction auditing API by migrating it to a serverless architecture on AWS. The application consists of an Amazon API Gateway REST API backed by AWS Lambda functions. The audit records must be written to an Amazon RDS PostgreSQL database deployed in private subnets. During end-of-month processing, the API experiences massive, unpredictable traffic spikes that exhaust the database connection pool. The Solutions Architect must design a highly available, secure solution. The solution must prevent the transaction auditing Lambda functions from consuming all execution capacity in the AWS region, which would throttle other critical applications. Additionally, database credentials must be managed securely, supporting rotation triggered from a centralized deployment pipeline in a separate security AWS account. Which configuration meets these requirements while adhering to the AWS Well-Architected Framework?

  1. Configure Amazon RDS Proxy between the Lambda functions and the PostgreSQL database. Deploy the Lambda functions in multiple private subnets across different Availability Zones with a configured reserved concurrency limit. Store database credentials in AWS Secrets Manager using a Customer Managed Key, configuring a custom key policy to allow access and rotation from the central security account. Deploy VPC interface endpoints to allow the Lambda functions to access Secrets Manager.Cevap
  2. B
    Configure Amazon RDS Proxy between the Lambda functions and the PostgreSQL database. Deploy the Lambda functions in multiple private subnets across different Availability Zones, and configure provisioned concurrency to handle execution spikes while leaving the regional execution limit unconstrained. Store database credentials in AWS Secrets Manager using a Customer Managed Key with a custom key policy. Deploy VPC interface endpoints to access Secrets Manager.
  3. C
    Configure Amazon RDS Proxy between the Lambda functions and the PostgreSQL database. Deploy the Lambda functions in multiple private subnets across different Availability Zones with a configured reserved concurrency limit. Store database credentials in AWS Secrets Manager encrypted with the default AWS-managed KMS key, and grant cross-account rotation access to the central security account by updating the AWS-managed KMS key policy. Deploy VPC interface endpoints to access Secrets Manager.
  4. D
    Configure Amazon RDS Proxy between the Lambda functions and the PostgreSQL database. Deploy the Lambda functions in a single private subnet to minimize networking complexity, routing all outbound internet and AWS service traffic through a single NAT Gateway in that Availability Zone. Set a configured reserved concurrency limit on the Lambda functions. Store database credentials in AWS Secrets Manager using a Customer Managed Key.

Cevap

Configure Amazon RDS Proxy between the Lambda functions and the PostgreSQL database. Deploy the Lambda functions in multiple private subnets across different Availability Zones with a configured reserved concurrency limit. Store database credentials in AWS Secrets Manager using a Customer Managed Key, configuring a custom key policy to allow access and rotation from the central security account. Deploy VPC interface endpoints to allow the Lambda functions to access Secrets Manager.
The correct solution solves connection scalability issues using Amazon RDS Proxy, protects other workloads by capping the function's maximum scale with a reserved concurrency limit, and allows secure cross-account key management for credential rotation via a Customer Managed Key. Using multiple private subnets and VPC endpoints keeps all data paths private and highly available.

Adım Adım Çözüm

1
Address database connection pooling and spikes
Amazon RDS Proxy is introduced to pool and share database connections, preventing connection exhaustion.
Serverless architectures spawn many ephemeral Lambda containers during traffic spikes, which can overwhelm traditional database connection limits.
2
Protect account-wide Lambda concurrency limits
Configure reserved concurrency on the auditing Lambda functions.
Reserved concurrency guarantees execution capacity for this function while capping its maximum concurrent executions, preventing it from consuming the entire regional pool and throttling other functions.
3
Secure database credentials for cross-account rotation
Store database credentials in Secrets Manager encrypted with a Customer Managed Key, modifying the KMS key policy to permit cross-account delegation.
AWS-managed KMS keys do not allow policy modification. A Customer Managed Key is required to grant decryption and rotation permissions to a security pipeline in a separate account.
4
Configure secure private connectivity
Deploy VPC interface endpoints for Secrets Manager and place Lambda in multiple private subnets.
This allows the VPC-bound Lambda functions to communicate securely with AWS service endpoints without routing traffic over the public internet, satisfying security and high availability pillars.

Anahtar Kavram

Serverless database connection management, concurrency protection, and cross-account KMS key policy delegation.
Bu soruyu puanla