
Answer-first summary for fast verification
Answer: By creating Lambda functions within the VPC and attaching the AWSLambdaVPCAccessExecutionRole policy, then updating the RDS security group for Lambda access.
The correct answer is B. To enable AWS Lambda functions to access resources within a VPC, you must attach the AWSLambdaVPCAccessExecutionRole policy to the Lambda execution role. This policy grants permissions needed by Lambda to create elastic network interfaces (ENIs) in the VPC and use the security groups attached to those ENIs for controlling inbound and outbound traffic. Additionally, you need to modify the RDS security group to allow inbound access from the Lambda security group to establish the necessary network connectivity.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can a company integrate AWS Lambda functions with an Amazon RDS MySQL DB instance within a private subnet of a VPC, after migrating from EC2 instances to a serverless architecture?
A
By creating Lambda functions within the VPC and attaching the AWSLambdaBasicExecutionRole policy, then adjusting the RDS security group for Lambda access.
B
By creating Lambda functions within the VPC and attaching the AWSLambdaVPCAccessExecutionRole policy, then updating the RDS security group for Lambda access.
C
By creating Lambda functions with the AWSLambdaBasicExecutionRole and setting up an interface VPC endpoint, with policies for lambda:InvokeFunction action on each Lambda ARN.
D
By creating Lambda functions with the AWSLambdaVPCAccessExecutionRole and setting up an interface VPC endpoint, with policies for lambda:InvokeFunction action on each Lambda ARN.
No comments yet.