
Answer-first summary for fast verification
Answer: Configure Lambda to connect to VPC with private subnet and Security Group needed to access RDS
Configure Lambda to connect to VPC with private subnet and Security Group needed to access RDS - You can configure a Lambda function to connect to private subnets in a virtual private cloud (VPC) in your account. Use Amazon Virtual Private Cloud (Amazon VPC) to create a private network for resources such as databases, cache instances, or internal services. Connect your lambda function to the VPC to access private resources during execution. When you connect a function to a VPC, Lambda creates an elastic network interface for each combination of the security group and subnet in your function's VPC configuration. This is the right way of giving RDS access to Lambda.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have recently completed the migration of an on-premise SQL Server database to an Amazon Relational Database Service (RDS) database, which resides in a private subnet within a Virtual Private Cloud (VPC). Additionally, the related Java-based application that was previously hosted on-premises has now been transitioned to an AWS Lambda function.
Given this setup, what steps should you take to ensure that the AWS Lambda function can successfully connect to the RDS instance?
A
Configure lambda to connect to the public subnet that will give internet access and use Security Group to access RDS inside the private subnet
B
Configure Lambda to connect to VPC with private subnet and Security Group needed to access RDS
C
Use Environment variables to pass in the RDS connection string
D
Use Lambda layers to connect to the internet and RDS separately
No comments yet.