'Interface Endpoint - How to ensure traffic is going via the endpoint

I have a VPC created using the VPC wizard

  • one AZ
  • one Public subnet, one Private subnet
  • one NAT Gateway
  • one Gateway Endpoint for S3

I then manually created a Interface Endpoint for EC2

I launched a EC2 in the private subnet and also a bastion host in the public subnet (so that I can ssh to the EC2 in private subnet)

The question: After creating the Interface Endpoint to EC2, how do I ensure/check that the traffic is going over the endpoint and not the internet?

There are ways to check this behavior for the Gateway Endpoint - as shown here

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source