Generally, AWS services are different entities and do not allow direct communication with each other without going through either an IGW, NAT gateway/instance, a VPN connection, or AWS Direct Connect. A VPC endpoint is an AWS service that enables you to create a private connection between different AWS services without going through the previously mentioned communication gateways.
Let's understand this scenario with some examples. In an enterprise infrastructure, an EC2 instance residing in a private subnet often needs to communicate with resources in other AWS services, for example, storing and retrieving objects in S3. Before the launch of a VPC endpoint, you need to deploy a NAT device in a public subnet with an Elastic IP and route entry in the private subnet's route table. Such communication used to take place through the internet. Now, with the help of a VPC endpoint, there is no need to route traffic through the internet. It routes the traffic within the AWS infrastructure...