I'm trying to access s3 using interface VPC Endpoint but i have a technical issue which i can’t solve.
I have A VPC with the following Subnet:
- Subnet A (Private without Internet)
- Subnet B (Private without Internet)
- Subnet C (Public with Internet Gateway)
- Subnet D (Private with NAT)
I have two instances:
- i-01 (Subnet A)
- i-02 (Subnet D)
I have an interface VPC Endpoint for Subnets A,B and Private DNS is Enabled.
the issue is when i dig the endpoint s3.us-east-1.amazonaws.com in both instances it returns the VPC Endpoints IPs.
Expected Behavior: Instance i-01 returns the VPC Endpoints IPs and instance i-02 return the public regional IP.
Am i understanding the interface concept wrong or the expected behavior is what should happen ?
and if i'm understanding it wrong how to seperate subnets from using the interface endpoint and the public IP