Question
Why do we need VPC Endpoint for EC2?
How should it be used?
My understanding
VPC Endpoint is a service that enables services inside VPC to access outside VPC through AWS network.
For example... (See the screenshot, black thin lines)
We assume that we have a Lambda function in a private subnet and want the function to access S3.
Without VPC Endpoint: Lambda function --> NAT Gateway --> Internet Gateway -(via Internet)-> S3 bucket
With VPC Endpoint: Lambda function --> VPC Endpoint -(via AWS network)-> S3 bucket
Problem
I find VPC Endpoint for EC2 (service name: com.amazonaws.ap-southeast-1.ec2
in Singapore region). EC2 instances are always in a specific VPC, so now I do not understand why VPC Endpoint for EC2 is needed.
Does it work like: Lambda function --> VPC Endpoint -(via AWS network)-> EC2 instance (not in VPC)?
This is wrong if I understand the settings of EC2 instances correctly.