Soru

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

A regional transit authority is modernizing its legacy commuter fare validation system by migrating to a serverless architecture on AWS. The system must process tap-in events from subway station turnstiles via an Amazon API Gateway Private REST API. An AWS Lambda function will run in private VPC subnets to validate the commuters' cards against a central MySQL database hosted on an Amazon RDS instance. The Lambda function must also query third-party transit APIs on the internet and securely share encrypted commuter validation logs with external partner transportation databases in separate AWS accounts. The solution must ensure high availability, prevent database connection exhaustion, protect the AWS account's execution capacity during morning rush hour spikes, and secure cross-account data sharing. Which architecture should a solutions architect recommend to satisfy these requirements?

  1. Configure an API Gateway Private REST API using interface VPC endpoints. Deploy the Lambda function across three Availability Zones (AZs) in the private subnets, using Amazon RDS Proxy to manage connection pooling to the MySQL instance. Deploy a NAT Gateway in a public subnet within each AZ to handle outbound internet traffic. Configure a reserved concurrency limit on the Lambda function to safeguard the account's unreserved concurrency pool, and use a customer managed KMS key with a modified key policy to encrypt the shared validation logs.Cevap
  2. B
    Configure an API Gateway Private REST API using interface VPC endpoints. Deploy the Lambda function across three Availability Zones (AZs) in the private subnets, using Amazon RDS Proxy to manage connection pooling to the MySQL instance. Deploy a single NAT Gateway in one public subnet, and configure the route tables of all private subnets to route outbound traffic through it. Configure a reserved concurrency limit on the Lambda function to safeguard the account's unreserved concurrency pool, and use a customer managed KMS key with a modified key policy to encrypt the shared validation logs.
  3. C
    Configure an API Gateway Private REST API using interface VPC endpoints. Deploy the Lambda function across three Availability Zones (AZs) in the private subnets, using Amazon RDS Proxy to manage connection pooling to the MySQL instance. Deploy a NAT Gateway in a public subnet within each AZ to handle outbound internet traffic. Configure a reserved concurrency limit on the Lambda function to safeguard the account's unreserved concurrency pool, and use the default AWS-managed KMS key for Lambda with a modified key policy to encrypt the shared validation logs.
  4. D
    Configure an API Gateway Private REST API using interface VPC endpoints. Deploy the Lambda function across three Availability Zones (AZs) in the private subnets, using Amazon RDS Proxy to manage connection pooling to the MySQL instance. Deploy a NAT Gateway in a public subnet within each AZ to handle outbound internet traffic. Allow the Lambda function to scale dynamically using the default regional unreserved concurrency pool to handle peak load, and use a customer managed KMS key with a modified key policy to encrypt the shared validation logs.

Cevap

Configure an API Gateway Private REST API using interface VPC endpoints. Deploy the Lambda function across three Availability Zones (AZs) in the private subnets, using Amazon RDS Proxy to manage connection pooling to the MySQL instance. Deploy a NAT Gateway in a public subnet within each AZ to handle outbound internet traffic. Configure a reserved concurrency limit on the Lambda function to safeguard the account's unreserved concurrency pool, and use a customer managed KMS key with a modified key policy to encrypt the shared validation logs.
The correct architecture integrates API Gateway Private endpoints for secure internal routing, utilizes RDS Proxy to scale MySQL connection pooling, ensures redundant NAT Gateways across all three Availability Zones to prevent a single point of failure for outbound internet API calls, uses reserved concurrency to safeguard the account's unreserved pool during peak traffic surges, and deploys a customer managed KMS key to support the necessary cross-account decryption permissions.

Adım Adım Çözüm

1
Select the correct API Gateway configuration for private turnstile access.
Amazon API Gateway Private REST API with interface VPC endpoints is utilized to keep the traffic isolated within the VPC.
This guarantees that public endpoints are not exposed to the internet, satisfying the private traffic requirements.
2
Determine the database connection pooling strategy.
Use Amazon RDS Proxy in front of the RDS MySQL instance.
Lambda functions scale horizontally and can rapidly open database connections. RDS Proxy pools and shares these connections, preventing database connection limits from being reached.
3
Design the high-availability network layout for outbound internet access.
Deploy the Lambda function across three AZs and place a NAT Gateway in each AZ's public subnet.
To maintain high availability and prevent a single point of failure (SPOF), routing outbound traffic through a NAT Gateway in each AZ ensures that an AZ failure does not impact internet routing for other zones.
4
Address concurrency protection.
Set a reserved concurrency limit on the validation Lambda function.
This guarantees that the bursty passenger validation function does not consume the entire unreserved regional execution pool, preventing other microservices in the account from being throttled.
5
Implement the cross-account KMS key strategy.
Use a customer managed KMS key with a modified key policy.
AWS-managed KMS keys do not support policy modifications and cannot be shared across accounts. A customer managed key must be used to explicitly grant decrypt permissions to external AWS accounts.

Anahtar Kavram

Modernizing legacy relational workloads using serverless architectures requires orchestrating private endpoint integrations, database connection management, redundant NAT gateway configurations for outbound API calls, concurrency control for throttling mitigation, and customer managed KMS keys for cross-account security.
Tahmini Süre:3m 0s
Bu soruyu puanla