Soru

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

A company is modernizing a legacy, on-premises payment settlement service by migrating it to a serverless architecture on AWS. The solution must expose a private API to external financial partners connecting via AWS Direct Connect. The partners authenticate using JSON Web Tokens (JWT) issued by a third-party Identity Provider (IdP). The backend consists of AWS Lambda functions that query an Amazon Aurora PostgreSQL database cluster.

The architecture must satisfy the following requirements:
- Partners must access the API securely over the private network connection without exposing traffic to the public internet.
- The database must be protected from connection exhaustion during sudden traffic spikes.
- The application must prevent the payment settlement workload from exhausting the regional unreserved Lambda concurrency pool, which would starve other critical services in the same AWS account.

Which combination of steps should the solutions architect take to meet these requirements? (Select TWO.)

  1. Create a private Amazon API Gateway REST API associated with interface VPC endpoints. Configure an API Gateway Lambda authorizer to validate the JWT tokens from the external Identity Provider.Cevap
  2. Deploy an Amazon RDS Proxy between the Lambda functions and the Aurora PostgreSQL database cluster. Configure a reserved concurrency limit on the Lambda functions.Cevap
  3. C
    Create a regional Amazon API Gateway REST API and configure a custom domain name. Integrate it with the Lambda functions configured with unlimited unreserved concurrency to handle sudden partner traffic spikes without throttling.
  4. D
    Modify the default AWS-managed KMS key (aws/apigateway) key policy to delegate decrypt permissions to the partner AWS accounts to allow secure payload decryption.
  5. E
    Deploy the Lambda functions in a single private subnet and route all database-bound traffic through a single NAT Gateway in a public subnet to ensure static IP routing to the database.

Cevap

The correct architecture uses a private Amazon API Gateway REST API associated with interface VPC endpoints to secure traffic over AWS Direct Connect, combined with an API Gateway Lambda authorizer to validate JWT tokens. Downstream, an Amazon RDS Proxy pools database connections to protect Aurora PostgreSQL, and setting a reserved concurrency limit on the Lambda functions protects the account's regional concurrency pool.
The correct solution uses a private API Gateway REST API with interface VPC endpoints to satisfy the private network access requirement, combined with a custom Lambda authorizer to validate JWTs. To prevent database connection exhaustion during high-volume spikes, Amazon RDS Proxy manages connection pooling. A reserved concurrency limit on the Lambda function prevents it from consuming the entire account's regional concurrency pool, satisfying the concurrency protection requirement.

Adım Adım Çözüm

1
Expose the private API securely over AWS Direct Connect.
Create a private Amazon API Gateway REST API and associate it with interface VPC endpoints (AWS PrivateLink) inside the VPC connected to Direct Connect.
This ensures partners can access the API endpoint over the private connection without exposing endpoints to the public internet.
2
Implement authentication using external JWTs.
Deploy an API Gateway Lambda authorizer to extract and validate the JWT tokens issued by the external Identity Provider.
API Gateway REST APIs require a Lambda authorizer to process and validate custom OAuth/JWT tokens from external, non-Cognito IdPs.
3
Protect the Aurora PostgreSQL database from connection exhaustion.
Deploy an Amazon RDS Proxy between the Lambda functions and the Aurora PostgreSQL database cluster.
RDS Proxy pools database connections and mitigates connection limits being exceeded during Lambda scaling spikes.
4
Prevent regional Lambda concurrency starvation.
Configure a reserved concurrency limit on the payment settlement Lambda functions.
This caps the maximum concurrency the functions can consume, ensuring that a surge in partner requests does not exhaust the account's unreserved concurrency pool.

Anahtar Kavram

Serverless modernization pattern using private API Gateway, custom Lambda authorizers, database connection pooling with RDS Proxy, and concurrency management safeguards.
Tahmini Süre:3m 0s
Bu soruyu puanla