Cyber Monday 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:

Jannette
1 months ago
I'm going with Option A. Anything that involves 'PrivateLink' just sounds like it's going to be a pain to set up. Keep it simple, folks!
upvoted 0 times
...
Alex
1 months 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
Latricia
6 days ago
Definitely, private subnets are the way to go for network access to private resources.
upvoted 0 times
...
Maurine
6 days ago
I agree, keeping it simple with private subnets is the way to go.
upvoted 0 times
...
Janessa
23 days ago
Option A sounds like the way to go. Private subnets for the win!
upvoted 0 times
...
...
Anabel
1 months ago
I agree with Stacey. Option A seems like the most straightforward solution for network access to private resources.
upvoted 0 times
...
Pamella
1 months 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
Marica
3 days ago
A seems like the most direct solution.
upvoted 0 times
...
Glendora
6 days ago
C) Configure a VPC endpoint connection for the Lambda function. Set up the VPC endpoint to route traffic through a NAT gateway.
upvoted 0 times
...
Dominque
18 days ago
A) Attach the Lambda function to the VPC through private subnets. Create a security group that allows network access to the private resources. Associate the security group with the Lambda function.
upvoted 0 times
...
...
Curtis
1 months 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
2 months 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
Galen
17 days ago
D) Option A provides a clear path for the Lambda function to access private resources securely.
upvoted 0 times
...
Hui
17 days ago
C) Definitely, setting up the Lambda function in the VPC with the right security group is key for network access.
upvoted 0 times
...
Na
20 days ago
B) I think option A is the best choice too. It's a simple and effective way to ensure network access.
upvoted 0 times
...
Kenneth
28 days ago
A) Attach the Lambda function to the VPC through private subnets. Create a security group that allows network access to the private resources. Associate the security group with the Lambda function.
upvoted 0 times
...
...
Stacey
2 months ago
I think option A is the best choice because it directly attaches the Lambda function to the VPC.
upvoted 0 times
...

Save Cancel