Soru

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

A financial services company is modernizing its legacy reporting system. The new architecture will use an Amazon API Gateway REST API to receive JSON report requests and route them to an AWS Lambda function. The Lambda function processes the reports and queries an Amazon RDS for PostgreSQL database located in a private subnet. The report requests are bursty, occasionally generating thousands of concurrent requests within a few minutes. Additionally, the Lambda function needs to call external third-party compliance APIs to validate the report metadata.

Which TWO of the following configurations should the solutions architect implement to ensure a secure, reliable, and scalable serverless architecture? (Select TWO.)

  1. Deploy Amazon RDS Proxy in the private subnets to pool database connections, and configure reserved concurrency on the Lambda function to prevent overwhelming the PostgreSQL database during traffic bursts.Cevap
  2. Deploy NAT Gateways in each Availability Zone where the Lambda function is configured to run, and update the private subnet route tables to direct outbound traffic to the local NAT Gateway.Cevap
  3. C
    Deploy a single NAT Gateway in a single Availability Zone, and update the route tables of all private subnets to route outbound traffic through this single NAT Gateway to reduce NAT gateway hourly charges.
  4. D
    Allow the Lambda function to scale dynamically using the default regional concurrency pool without setting any reserved concurrency limits, relying on database-level connection timeouts to handle peaks.
  5. E
    Configure the system to encrypt database credentials in AWS Secrets Manager using the default AWS-managed KMS key (aws/secretsmanager), and update its key policy to delegate read permissions to a cross-account IAM role used by the Lambda function.

Cevap

Deploy Amazon RDS Proxy in the private subnets to pool database connections, configure reserved concurrency on the Lambda function, and deploy NAT Gateways in each Availability Zone where the Lambda function runs to route outbound traffic.
Deploying Amazon RDS Proxy pools and reuses database connections, preventing the PostgreSQL database from crashing due to connection limits under high-volume spikes. Configuring reserved concurrency prevents the Lambda function from scaling excessively, which protects the database and safeguards regional concurrency. Setting up multiple NAT Gateways ensures redundant outbound routes for API validations in case of an Availability Zone outage.

Adım Adım Çözüm

1
Analyze the database connection scaling limits and concurrency requirements under bursty workloads.
Identified that thousands of bursty concurrent Lambda executions will quickly exhaust the connection limit of the Amazon RDS for PostgreSQL database.
Lambda functions scale horizontally by launching individual containers, each establishing its own database connection. Pooling is necessary.
2
Select a connection management and throttling solution.
Selected Amazon RDS Proxy to pool connections and configured reserved concurrency on the Lambda function to place an upper limit on execution scaling.
This protects the downstream database from connection exhaustion and protects the AWS account from regional concurrency starvation.
3
Evaluate high availability and outbound network connectivity requirements.
Selected multi-AZ NAT Gateways to route outbound traffic from the private subnets to the external third-party APIs.
A single NAT Gateway introduces a single point of failure, violating the reliability pillar of the AWS Well-Architected Framework.

Anahtar Kavram

Modernizing legacy workloads to serverless requires managing outbound internet access, database connection scaling, and function concurrency to prevent regional throttling and database exhaustion.
Bu soruyu puanla