How do you give workloads in a private subnet access to AWS services without routing through a NAT gateway, and why would you?

technical-conceptual · Mid level · cloud-devops-security

What the interviewer is really asking

Assess VPC egress design judgment — knowing gateway vs interface (PrivateLink) endpoints, the security benefit of keeping traffic off the public internet, and the data-transfer cost difference versus a NAT gateway, rather than treating NAT as the only way out.

What to say

What to avoid

Example answers

Strong: Our EKS nodes in private subnets were pulling images from ECR and shipping logs to CloudWatch entirely through a NAT gateway, and the NAT data-processing line was our biggest networking cost. I added gateway endpoints for S3 (ECR layers live in S3) and interface endpoints for ECR API, CloudWatch Logs, and SSM. The bulk of the traffic stopped hitting NAT — cost dropped sharply and the traffic now stays on the AWS network instead of egressing to the internet and back.

Weak: I'd put a NAT gateway in front of the private subnet — that's how instances without public IPs reach AWS services.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.