Courseiva
Design for New SolutionseasyMultiple ChoiceObjective-mapped

SAP-C02 Design for New Solutions Practice Question

A company is designing a serverless application using AWS Lambda that processes images uploaded to an S3 bucket. The processing time varies but typically completes within 5 minutes. The Lambda function needs to access a VPC-hosted database. What is the BEST way to configure the Lambda function to access the database while minimizing cold start latency?

⚠ Common exam trap

Many candidates assume Lambda must be placed inside the VPC to access VPC resources, overlooking that VPC interface endpoints (PrivateLink) allow secure, low-latency access without the cold start penalty of VPC attachment.

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

Use an Amazon VPC interface endpoint for Lambda and keep the function outside the VPC

Using an Amazon VPC interface endpoint for Lambda allows the function to remain outside the VPC while securely accessing resources inside the VPC via AWS PrivateLink. This avoids the cold start latency penalty (often 10+ seconds) incurred when attaching a Lambda function to a VPC, which requires Elastic Network Interface (ENI) creation. The function can directly invoke the database through the interface endpoint without traversing the public internet or needing a NAT gateway.

Answer analysis

Option-by-option breakdown

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

  • Place the Lambda function outside the VPC and use a NAT gateway to reach the database

    Why it's wrong here

    NAT gateway is for outbound traffic; the database is inbound.

  • Place the Lambda function inside the VPC with a security group allowing access to the database

    Why it's wrong here

    Lambda in VPC requires ENI creation, increasing cold start latency.

  • Use Amazon RDS Proxy to manage connections and keep Lambda outside the VPC

    Why it's wrong here

    RDS Proxy requires the Lambda function to be in the VPC or use a VPC endpoint.

  • Use an Amazon VPC interface endpoint for Lambda and keep the function outside the VPC

    Why this is correct

    Interface endpoints allow VPC access without placing Lambda in the VPC, reducing cold starts.

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

One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-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 SAP-C02 exam.