BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon Exam DVA-C02 Topic 4 Question 41 Discussion

Actual exam question for Amazon's DVA-C02 exam
Question #: 41
Topic #: 4
[All DVA-C02 Questions]

A developer is creating an AWS Lambda function that needs network access to private resources in a VPC.

Show Suggested Answer Hide Answer
Suggested Answer: A

Comprehensive Detailed Step by Step Explanation with All AWS Developer Reference:

When you need to provide an AWS Lambda function access to private resources in a VPC, the most common and straightforward approach is to attach the Lambda function to a VPC via private subnets. Once the Lambda function is associated with the VPC, you need to configure appropriate security groups to control the access to the private resources.

Lambda with VPC Access: Lambda functions can be attached to private subnets in a VPC, allowing them to access resources like RDS, EC2, or internal services within that VPC.

Security Groups: A security group acts as a virtual firewall for the Lambda function, ensuring that it can access only the necessary resources and ports in the VPC.

Alternatives:

Option B involves routing traffic through a VPN, which adds unnecessary complexity and operational overhead compared to simply attaching the Lambda to the VPC.

Option C requires configuring a VPC endpoint and a NAT gateway, which can be complex and costly.

Option D refers to AWS PrivateLink, which is used to access services over private connections, but it's unnecessary in this scenario unless you need a cross-VPC connection.


Lambda functions in a VPC

Contribute your Thoughts:

Alex
1 days ago
I'm leaning towards Option A as well. Gotta love it when the simple solution is also the right one. Plus, it's just more fun to say 'private subnets' than 'PrivateLink'.
upvoted 0 times
...
Anabel
11 days ago
I agree with Stacey. Option A seems like the most straightforward solution for network access to private resources.
upvoted 0 times
...
Pamella
12 days ago
Option C is an interesting idea, but I'm not sure if the VPC endpoint and NAT gateway setup is necessary for this scenario. A seems like the most direct solution.
upvoted 0 times
...
Curtis
14 days ago
I agree with Yun. Option A is the clear winner here. Keeping everything within the VPC just makes sense for a use case like this.
upvoted 0 times
...
Yun
18 days ago
Option A seems like the way to go. Attaching the Lambda function to the VPC through private subnets and setting up a security group sounds like a straightforward approach.
upvoted 0 times
...
Stacey
25 days ago
I think option A is the best choice because it directly attaches the Lambda function to the VPC.
upvoted 0 times
...

Save Cancel