The network is the path data travels between users, servers and AWS services. Networking enters the SAA-C03 exam through two tasks in the exam guide: task 3.4 asks for high-performing network architectures and task 4.4 for cost-optimized network architectures. Both tasks depend on the same thing, which is the path each byte travels. If a byte travels far, the application responds slowly, and if it leaves an Availability Zone, a Region or goes to the internet, it shows up on the bill. For example, an online store with servers in the United States and customers in Chile pays in time, because each photo travels far, and pays in money, because each photo goes out to the internet.
Bringing the application closer to users
An application in us-east-2 (Ohio), an AWS Region in the United States, responds more slowly to a user in Santiago than to one in Ohio, because each request crosses the internet there and back. Amazon CloudFront and AWS Global Accelerator shorten that path with the AWS global network, which has entry points in many cities called edge locations, but they do it in different ways. For example, the customer in Santiago enters the AWS network at a nearby point and from there their data travels over AWS cables instead of over the internet.

CloudFront keeps copies of the content in the edge locations, in a cache, and only goes to the origin, which is where the original lives (an S3 bucket, an ALB or another web server), when the edge doesn't have the object. Global Accelerator, on the other hand, has no cache: it receives the traffic at the edge with two static anycast IP addresses and carries it over the AWS network to the nearest healthy endpoint, which is the server that responds. That endpoint can be an NLB, an ALB, an EC2 instance or an Elastic IP address.
Because of that difference, each service is chosen by the type of traffic:
- Amazon CloudFront, which is for web content over HTTP and HTTPS, static or dynamic. Static content is the same for everyone, like a photo, and dynamic content changes on each visit, like each customer's cart.
- AWS Global Accelerator, which is for TCP or UDP traffic that isn't web, such as online games and voice over IP, which is calling over the internet, or for clients that need static IP addresses.
Besides caching, CloudFront terminates TLS close to the user, that is, it sets up the secure connection there, and keeps connections open with the origin. That is why it also speeds up APIs whose responses can't be cached. In Global Accelerator, on the other hand, what matters are the two IP addresses, which stay the same as long as the accelerator exists even if you change the endpoints behind it. For example, the store puts CloudFront in front of its product photos, while an online game that uses UDP puts Global Accelerator in front of its servers.
Where is data transfer charged?

Data transfer is moving data from one place to another, and AWS charges for it based on the path each byte follows. The prices are examples from us-east-2 and change by Region, but the rules are the same in all of them:
- Between instances in the same zone with private IP addresses, where transfer isn't charged.
- Between zones in the same Region, where EC2, RDS, ElastiCache and network interfaces pay 0.01 USD per GB in each direction.
- From EC2 to S3 in the same Region, where transfer isn't charged.
- Out to the internet, where it is charged per GB, with 100 GB free per month across all services and Regions.
- From an origin in AWS to CloudFront, where you don't pay for transfer and only pay for what CloudFront delivers to users.
For example, when the store's server saves a photo to S3 in the same Region it doesn't pay for transfer, but when a customer downloads that photo from the internet it is charged.
The charge between zones is the price of availability. A Multi-AZ architecture, which spreads its servers across several zones, pays that 0.01 USD per GB in exchange for continuing to work if a zone goes down. For example, if the store's database is in one zone and its web servers in another, the data for each query pays that charge between zones.
The NAT gateway and gateway endpoints
Inside AWS, your servers live in a VPC, which is your private network, split into subnets. A NAT gateway lets the instances in a private subnet reach the internet without accepting connections that come from outside. It charges for each hour it exists, where a partial hour counts as a full one, and for each GB it processes, wherever it goes. The AWS example in us-east-2 is 0.045 USD per hour and 0.045 USD per GB. For example, a private server of the store uses the NAT gateway to download updates from the internet, and nobody from outside can get into it that way.
This per-GB charge shows up even if the destination is free. When private instances send data to S3 through the NAT gateway, the transfer from EC2 to S3 in the same Region isn't charged, but each GB pays the NAT processing. A VPC gateway endpoint for S3 (or for DynamoDB), on the other hand, is a direct entrance from your VPC to that service: it sends that traffic over the AWS network without going through the NAT, and it doesn't charge per hour or for data. For example, if the store's private servers save their backups to S3 every night, a gateway endpoint removes the NAT charge for each GB of those backups.
One NAT gateway per zone or a shared one

Where you put the NAT gateway also changes the bill. If the NAT gateway is in a different zone from the instance, you also pay for transfer between zones. That is why you have three options, each with its own cost:
- One NAT gateway in each zone, where you pay for more hours.
- A shared NAT gateway, where you pay for transfer between zones and, if its zone goes down, the instances in the other zones are left without internet access.
- A regional NAT gateway, which charges one hour for each zone it operates in.
For example, if the store has servers in two zones and puts a single NAT gateway in the first one, the servers in the second pay for transfer between zones and are left without internet if the first zone fails.
If your account uses the new experience
In a new experience account, VPC, NAT gateway, gateway endpoints and CloudFront are available, although CloudFront works without Lambda@Edge. AWS Global Accelerator isn't available, and this account doesn't support cross-Region features either, so you study the scenarios with endpoints in two Regions in theory or try them in a full account. For example, you can create a CloudFront distribution for a practice bucket, but not a Global Accelerator accelerator.
cloud path tip: a NAT gateway charges from the moment you create it, so delete it when you finish each practice session.
On the exam
The questions on this topic describe the traffic and where it goes. These words in the question point to the answer:
- "Static content", "cache" or "users around the world" with HTTP, which point to CloudFront.
- "UDP", "static IP addresses", "games", "VoIP" or endpoints in several Regions, which point to Global Accelerator.
- "Private instances" together with "a lot of traffic to S3 or DynamoDB", which point to a gateway endpoint.
For example, if the question says "the private instances send a lot of data to DynamoDB and the NAT gateway costs a lot", the answer is a gateway endpoint.