QuestionQ29

Deployment

A developer is deploying a new Node.js AWS Lambda function that is not connected to a VPC. The Lambda function needs to connect to and query an Amazon Aurora database that is not publicly accessible. The developer is expecting unpredictable surges in database traffic.

What should the developer do to give the Lambda function access to the database?

  • A Configure the Lambda function to use an Amazon RDS proxy.
  • B Configure a NAT gateway. Attach the NAT gateway to the Lambda function.
  • C Enable public access on the Aurora database. Configure a security group on the database to allow outbound access for the database engine’s port.
  • D Enable VPC access for the Lambda function. Attach the Lambda function to a new security group that does not have rules.
Explanation

Amazon RDS Proxy sits between the Lambda function and Aurora, pooling and multiplexing database connections so that unpredictable traffic surges do not overwhelm the database with connection storms, while the proxy itself resolves the private connectivity needed to reach a non-publicly-accessible Aurora instance. Simply enabling VPC access with a security group that has no rules would still leave the Lambda function unable to reach the database, since a security group must explicitly permit the outbound/inbound traffic on the database port.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!