Question 971 of 724
DVA-C02 Security Practice Question
A Lambda function in a VPC must retrieve secrets from Secrets Manager without traversing the public internet. Which configuration should be used?
⚠ Common exam trap
It's easy for candidates to confuse NAT gateways or internet gateways as solutions for private service access, not realizing that AWS PrivateLink endpoints are the correct mechanism to keep traffic within the AWS backbone.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
An interface VPC endpoint for Secrets Manager with appropriate security groups
An interface VPC endpoint (AWS PrivateLink) for Secrets Manager allows Lambda functions within a VPC to securely retrieve secrets using private IP addresses, without traversing the public internet. This is achieved by creating an elastic network interface in the VPC subnet with a security group that controls access, ensuring traffic stays within the AWS network.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A public NAT gateway only
Why it's wrong here
A public NAT gateway provides outbound internet access for resources located in private subnets. While this configuration would allow the Lambda function to reach the public endpoint of AWS Secrets Manager, it routes traffic over the public internet, even if within the AWS backbone. This approach is less secure and less private than dedicated private connectivity, and it incurs additional data transfer costs for traffic processed by the NAT Gateway.
- ✗
An internet gateway attached to the Lambda subnet
Why it's wrong here
An Internet Gateway (IGW) enables direct internet access for resources within public subnets. Attaching an IGW to a Lambda subnet would effectively make that subnet public, exposing the Lambda function to the internet, which is generally not recommended for security best practices. Furthermore, accessing AWS Secrets Manager via its public endpoint, even from a public subnet, does not leverage the private connectivity options available within AWS.
- ✗
A VPC peering connection to every AWS region
Why it's wrong here
VPC peering connections establish private network connectivity between two distinct VPCs, enabling resources in one VPC to communicate with resources in another as if they were on the same network. However, AWS Secrets Manager is a regional AWS service, not a resource residing within a customer's VPC. Therefore, peering with other VPCs, even across regions, would not provide the necessary private access to the Secrets Manager service endpoint itself.
- ✓
An interface VPC endpoint for Secrets Manager with appropriate security groups
Why this is correct
An interface VPC endpoint for Secrets Manager, powered by AWS PrivateLink, establishes a private connection from your VPC to the Secrets Manager service. This allows the Lambda function to retrieve secrets without traffic leaving the Amazon network or traversing the public internet, significantly enhancing security and reducing latency. Configuring appropriate security groups on the endpoint ensures only authorized resources, like the Lambda function, can establish connections.
Visual reference
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.