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
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
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 →
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.