Skip to main content

πŸ”’ 06. VPC Endpoints

By default, when you access AWS services (like S3, DynamoDB, or CloudWatch) from your VPC,
the traffic goes over the public internet β€” even if you’re inside AWS.

VPC Endpoints allow you to connect privately to AWS services using the AWS internal network,
without using the public internet.

BenefitDescription
Enhanced SecurityTraffic never leaves AWS’s private backbone. No exposure to public internet.
Lower LatencyFewer network hops, faster communication.
Simpler ConfigurationNo need for Internet Gateways, NAT Gateways, or public IPs.
Cost OptimizationReduces NAT Gateway data processing costs for private traffic.
TypeUsed ForDescription
Gateway EndpointπŸͺ£ S3, πŸ”’ DynamoDBA route added to your route table that directs traffic privately.
Interface EndpointπŸ’¬ Most other AWS servicesUses Elastic Network Interfaces (ENIs) in your subnet to connect privately to the service.

🧩 Gateway Endpoint​

  • Used only for Amazon S3 and DynamoDB.
  • Adds an entry in the route table of your VPC.
  • Traffic to these services stays within AWS’s private network.

Example: Private Subnet β†’ Gateway Endpoint β†’ S3/DynamoDB (Private)

IAM Roles Example

🧩 Interface Endpoint​

  • Used for all other AWS services (e.g., CloudWatch, EC2 API, KMS, SNS, etc.).
  • Creates a private Elastic Network Interface (ENI) in your subnet.
  • The ENI connects to the service via AWS PrivateLink.

πŸ“— Example: Interface Endpoint for CloudWatch​

  • EC2 in private subnet sends metrics to CloudWatch privately.
  • A private ENI is created in the subnet.
  • Traffic never leaves AWS’s internal network.

Exam Tips​

TopicKey Point
Gateway Endpoint ServicesOnly S3 and DynamoDB
Interface Endpoint ServicesAlmost every other AWS service
Underlying TechInterface endpoints use AWS PrivateLink
Region SupportWorks within the same region (no transitive routing)
Internet Required?❌ No β€” stays inside AWS network
Security GroupsRequired for Interface Endpoints (because they create ENIs)

βœ… Summary​

ConceptGateway EndpointInterface Endpoint
Used ForS3, DynamoDBMost other services
MechanismRoute table entryElastic Network Interface (ENI)
TechnologyNative VPC routingAWS PrivateLink
Requires SG?❌ Noβœ… Yes
Transitive?❌ No❌ No
Example ServiceS3, DynamoDBCloudWatch, EC2, SNS, SSM