Courseiva
Question 971 of 724
SecurityhardMultiple ChoiceObjective-mapped

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

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, 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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

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.