Generally, traffic traveling to the Amazon S3 service would use the public internet to get to its destination. If this had originated from an EC2 instance from within your VPC, then this route could take an IGW if the instance was in a public subnet or a NAT gateway if it was in a private subnet.
If you want to keep your traffic more secure and don’t want that traffic to traverse over the public internet, you must add a VPC endpoint:
Figure 10.28: The AWS VPC menu
Figure 10.29: The Endpoint settings screen
Figure 10.30: The Endpoint Services screen
Figure 10.31: The VPC screen
Figure 10.32: The Subnets selection screen
Figure 10.33: The Security group selection screen
Figure 10.34: The Policy selection screen
You now have an endpoint created for direct communication with your S3 buckets without having to traverse the public internet.
In this chapter, you reviewed the foundational networking component of the AWS cloud, the VPC. You learned how to create a VPC network using a CloudFormation template with both a public and private subnet and then attach an IGW for internet connectivity. After creation, you explored the different components of the VPC to become familiar with them.
You then reviewed the different network connectivity options available for the VPCs in the account you are working on as well as other accounts and then the network traffic back to data centers that need to connect to AWS resources. These included options for connecting over public networks, such as VPNs to keep your transmissions secure and encrypted, along with Direct Connect, peering, and endpoints to keep your transmissions off the public internet.
Chapter 11, Securing EC2 Instances, will discuss how to secure EC2 instances when you are inside the perimeter of your network.