Courseiva

CCSP Cloud Platform and Infrastructure Security Practice Question

A company uses AWS and needs to allow a Lambda function in a VPC to access an S3 bucket without traversing the internet. Which solution meets this requirement securely?

⚠ Common exam trap

CCSP often tests whether candidates confuse NAT gateway (internet-bound) with VPC endpoints (private AWS service access) and mistakenly try to peer with an AWS-managed service VPC.

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

✓

Create a VPC endpoint for S3 and attach it to the Lambda's VPC

A VPC endpoint for S3 (gateway endpoint) allows resources in a VPC, including Lambda functions, to reach S3 privately without traversing the internet, NAT, or an internet gateway. Traffic stays on the AWS backbone and can be controlled with endpoint policies.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Configure a NAT gateway in the VPC and route traffic through it

    Why it's wrong here

    A NAT gateway gives private subnets outbound internet access, so S3 traffic still leaves the VPC via the public AWS network. It is the right choice for reaching external endpoints, not for private access to an AWS service.

  • ✓

    Create a VPC endpoint for S3 and attach it to the Lambda's VPC

    Why this is correct

    A VPC endpoint for S3 routes traffic privately through the AWS network to the bucket, so the Lambda function never traverses the internet. This satisfies the no-internet constraint while keeping access controlled by endpoint and bucket policies rather than public exposure.

  • ✗

    Use VPC peering to connect to the S3 bucket's VPC

    Why it's wrong here

    S3 buckets do not reside in a customer VPC, so there is no VPC to peer with; peering links two VPCs only. Peering is correct for private connectivity between your own VPCs, not to an AWS-managed service endpoint.

  • ✗

    Assign a public IP to the Lambda and use an internet gateway

    Why it's wrong here

    An internet gateway routes traffic to and from the public internet, so this path still traverses it, defeating the no-internet requirement. It is tempting because public IPs and internet gateways do enable S3 access, but only via the internet; a VPC endpoint (gateway or interface) is the correct private mechanism.

Visual reference

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This CCSP question is part of Courseiva's 934-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official ISC2 exam blueprint

This CCSP practice question is part of Courseiva's free ISC2 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 CCSP exam.