SAP-C03 Data Transfer and Network Cost Optimization: CloudFront, VPC Endpoints, NAT, Transit Gateway and Replication
Optimizing data transfer and network costs means designing the path each gigabyte takes through AWS so it crosses as few charged meters as possible: internet egress, inter-Region and inter-AZ transfer, and per-GB processing by NAT gateways, transit gateways and endpoints. This lesson covers SAP-C03 Task 3.2: CloudFront delivery, caching, Origin Shield and origin failover; VPC endpoints versus NAT gateways and AZ-aware traffic; the pricing models of Transit Gateway, VPC peering and PrivateLink; Direct Connect versus VPN egress; cost-aware S3 and DynamoDB multi-Region replication; and data transfer for AI workloads, including Amazon Bedrock cross-Region inference.
On this page10 sections
- Where data transfer and network charges come from
- CloudFront as an egress lever: offload, price classes and the alternatives
- Caching strategy: cache keys, compression and TTLs
- Origin Shield and origin failover patterns
- VPC endpoints versus NAT gateways
- NAT gateway placement and Availability Zone-aware architectures
- Transit Gateway, VPC peering, PrivateLink and VPC Lattice pricing models
- Hybrid egress: AWS Direct Connect versus VPN
- Cost-aware multi-Region replication: S3 and DynamoDB
- Data transfer for AI/ML workloads: cross-Region inference and data locality
- Trace a request's data path and name every transfer and processing charge it incurs
- Design CloudFront delivery with minimal cache keys, compression, the right price class, Origin Shield and origin-group failover
- Choose between gateway endpoints, interface endpoints and NAT gateways, and place NAT gateways and traffic to avoid inter-AZ charges
- Compare the pricing models of Transit Gateway, VPC peering, PrivateLink and VPC Lattice, and Direct Connect versus VPN egress
- Configure S3 Cross-Region Replication and DynamoDB global tables so replication cost matches the RPO and access needs
- Reduce AI/ML data transfer cost with Bedrock cross-Region inference profiles and in-Region copies of model artifacts
Where data transfer and network charges come from
Data transfer cost on AWS comes from a small set of meters, and an architect lowers it by changing the path traffic takes so that it crosses fewer of them. Data coming in from the internet is free. Data leaving AWS to the internet is charged per GB. Data crossing between Regions is charged per GB by the sending Region. Data crossing between Availability Zones in the same Region is charged in each direction. On top of the transfer meters sit processing charges: a NAT gateway, a transit gateway attachment, an interface VPC endpoint and VPC Lattice each bill per GB that flows through them, and a Network Load Balancer bills capacity units in which processed bytes are one dimension.
| Path | What is charged | Typical lever |
|---|---|---|
| Internet to AWS | Nothing for transfer in | None needed |
| AWS origin to viewers on the internet | Data transfer out per GB | Amazon CloudFront in front of the origin; price class |
| Same AZ, private IP | No transfer charge | Keep chatty components in one AZ where availability allows |
| Across AZs in one Region | Per GB, in each direction | AZ-aware routing, NAT gateway per AZ, rack awareness |
| Across Regions | Per GB, charged by the source Region | Replicate once and read locally; replicate only what needs a copy |
| Private subnet to an AWS service through NAT | NAT hourly + per-GB processing (+ inter-AZ if the NAT is in another AZ) | Gateway or interface VPC endpoints |
| VPC to VPC through a transit gateway | Per-GB processing on data sent from the attachment | VPC peering for heavy pairs |
| AWS to on premises | Data transfer out at internet rates (VPN) or Direct Connect rates | AWS Direct Connect for large, steady flows |
Two habits follow from this table. First, price a design by following each GB from source to destination and adding every meter it crosses, rather than looking at a single service. Second, the cheapest design usually moves data once to where it is read many times, then serves the repeated reads locally. Every section below applies one of those habits.
CloudFront as an egress lever: offload, price classes and the alternatives
Putting Amazon CloudFront in front of an AWS origin is the main way to cut internet egress, because data transfer from AWS origins (Amazon S3, Application Load Balancers, Amazon EC2) to CloudFront edge locations is free, CloudFront's own delivery rates are lower than S3 or EC2 data transfer out to the internet, and every cache hit is served without touching the origin at all. This holds for dynamic sites too: an ALB origin serving shared, cacheable pages and images benefits in the same way, and uncacheable requests still travel over the AWS network at CloudFront rates. For a private S3 bucket, use origin access control (OAC) so only the distribution can read it.
Options that look like egress savings but are not
- S3 Requester Pays moves request and transfer charges to the requester, but the requester must be an authenticated AWS identity. Anonymous web visitors cannot be billed, so it does not fit a public website.
- S3 Multi-Region Access Points route requests to the nearest replica bucket, but they add a per-GB data routing charge (and an internet acceleration charge for internet traffic) on top of normal transfer.
- AWS Global Accelerator improves the network path to load balancers, EC2 instances and Elastic IP addresses, but it caches nothing, cannot use an S3 bucket as an endpoint, and adds an hourly fee plus a data transfer premium.
- S3 Transfer Acceleration speeds long-distance uploads and downloads through edge locations and adds a per-GB fee; it is a speed feature, not a cost saving.
Price classes
A CloudFront price class limits which edge locations serve the distribution, so you stop paying the highest-cost regional rates. Viewers outside the chosen class are not blocked: they are served from an included edge location, with higher latency. A geographic restriction is a different feature that refuses viewers by country, so it is never the way to save money while staying reachable.
| Price class | Edge locations included | Fits |
|---|---|---|
| Price Class 100 | North America, Europe, Israel, Türkiye | Audience almost entirely in North America and Europe |
| Price Class 200 | Price Class 100 plus the Middle East, Africa, Japan, India, South Korea and most of Asia; excludes South America and Australia/New Zealand | Large audiences in Asia as well as North America and Europe |
| Price Class All | Every edge location | Global audience where latency everywhere matters most |
Pick the smallest class that still contains every region where your viewers are. For steady, predictable CloudFront usage, the CloudFront Security Savings Bundle lowers the bill in exchange for a one-year commitment of monthly spend, so it is the wrong lever when the requirement is no commitment. CloudFront also offers flat-rate pricing plans: a fixed monthly price per distribution with a usage allowance and no overage charges, which suits teams that want a predictable bill rather than pay-as-you-go rates.
Caching strategy: cache keys, compression and TTLs
The cost of a CloudFront distribution falls as its cache hit ratio rises, and the hit ratio is decided mostly by the cache key. CloudFront separates two policies attached to a cache behavior:
| Policy | What it controls | Effect on cost |
|---|---|---|
| Cache policy | The cache key (which headers, cookies and query strings make an object different) and the TTL settings | Every value added to the key splits the cache into more variants and lowers the hit ratio |
| Origin request policy | Extra headers, cookies and query strings forwarded to the origin | Forwards what the origin needs without adding it to the cache key |
The rule is: the cache key contains only what changes the response. Suppose a search results page changes with its sort and currency query strings, while the origin also wants a tracking cookie and a device-type header for analytics. Key on the two query strings and forward the cookie and header through an origin request policy. Every value that is unique per visitor or per device and sits in the cache key splits the cache into near-identical copies that are each fetched from the origin.
Compression and long TTLs for versioned assets
To reduce the bytes delivered, enable Gzip and Brotli in the behavior's cache policy (this also makes the normalized Accept-Encoding part of the key) and turn on automatic object compression for the behavior, so CloudFront compresses text files such as JavaScript, CSS and JSON at the edge. Then set a long Cache-Control: max-age on any file whose name carries a fingerprint of its contents (for example styles.8d2e7b.css), so the setting travels with the object from the moment the pipeline writes it. Because the file name changes with every release, the old object never needs replacing, and browsers and edges reuse it without re-downloading.
Invalidation is for objects whose names do not change. A wildcard such as /* counts as a single path against the monthly free allowance, but invalidation only removes cached copies: it does not reduce the bytes delivered and, used after every deploy, it forces the edges to refetch everything. Versioned file names make most invalidations unnecessary.
Origin Shield and origin failover patterns
CloudFront Origin Shield is an extra, centralized caching layer that collapses cache misses from all regional edge caches into a single request to the origin, which lowers origin load and origin-side egress. It is configured per origin, and you choose the Origin Shield Region with the lowest latency to that origin; for an AWS origin that is normally the origin's own Region.
When Origin Shield pays off
- Viewers spread across many geographies, so many regional edge caches miss on the same object.
- Origins that are expensive to hit: just-in-time video packaging (for example AWS Elemental MediaPackage), on-the-fly image processing, on-premises origins with limited bandwidth.
- Multi-CDN setups, where Origin Shield acts as the one cache in front of the origin for every CDN.
Origin Shield has its own request charge. Requests it treats as dynamic always pass through it as an extra layer and are always charged: PUT, POST, PATCH and DELETE requests, requests to behaviors with caching disabled, and GET or HEAD requests whose TTL is under 3,600 seconds (so frequently refreshed objects, such as live playlists, count as dynamic). Cacheable requests are charged only when they reach Origin Shield from a regional edge cache in a different Region; requests that start in the Origin Shield Region itself skip the extra layer. Because Origin Shield is a property of an origin, a distribution can define the same host twice: one origin entry with Origin Shield for the cache behaviors that serve long-lived objects, and one without it for behaviors that carry uncacheable traffic. Keep the cache policy on the shielded behaviors lean too, or cookies and irrelevant query strings split the cache and defeat the shield.
Origin groups for failover
A CloudFront origin group lists a primary and a secondary origin and a set of failover status codes (typically 5xx) and timeouts. When the primary fails a request, CloudFront retries that request against the secondary, inside the same distribution. Origin failover applies only to GET, HEAD and OPTIONS requests, so it protects read paths, not writes. For a static site in S3, the low-cost Regional failover pattern is S3 Cross-Region Replication to a bucket in a second Region plus an origin group that uses both buckets. You pay for the replica's storage and replication, and the secondary serves traffic only after a failure.
| Failover layer | How it behaves | Cost shape |
|---|---|---|
| Origin level (origin group in one distribution) | Per request, as soon as the primary returns a failover status code or times out | Replica storage and replication; the secondary serves traffic only during a failure |
| DNS level (health-checked records across separate endpoints) | After health checks fail and resolvers pick up the new answer | Every extra endpoint you run, plus health checks |
A routing or acceleration service placed in front of the origin adds its own charges to every request, not just the requests served during a failure, so check its fee schedule before using it as a failover layer (the S3 and Global Accelerator charges are covered above).
Origin groups work with Origin Shield, but each origin uses its own setting. After failover, requests reach the secondary through the secondary's Origin Shield, not the primary's. Enable Origin Shield on every origin in the group, each in the Region closest to that origin (a replica bucket in ap-southeast-2 gets a shield in ap-southeast-2), or the secondary takes the full, unshielded load during a failover.
VPC endpoints versus NAT gateways
Traffic from private subnets to AWS services is cheapest through VPC endpoints, because a NAT gateway charges per GB processed on top of its hourly fee, and that processing charge dominates at volume.
| Gateway endpoint | Interface endpoint (PrivateLink) | NAT gateway | |
|---|---|---|---|
| Services | Amazon S3 and Amazon DynamoDB only | Most AWS services (including S3 and DynamoDB), plus partner and your own endpoint services | Anything on the internet or public AWS endpoints |
| Charges | None: no hourly or per-GB fee | Per endpoint per AZ-hour plus per GB processed (far below NAT's per-GB rate) | Per hour plus per GB processed |
| How it is used | Route table entry (prefix list) | ENIs in subnets, private DNS | Default route |
| Reach | Same-Region buckets/tables only; not usable from on premises or through peering/TGW | Reachable from peered VPCs, transit gateways and on premises | Any destination |
Gateway endpoints
For same-Region S3 or DynamoDB traffic from private subnets, a gateway endpoint associated with the private route tables removes the NAT processing charge at no cost and keeps instances without public IPs. A gateway endpoint never carries cross-Region traffic: requests to a bucket in another Region do not match its prefix list and follow the default route, through NAT, so cross-Region S3 reads keep their NAT and inter-Region charges.
Interface endpoint economics
- High-volume service traffic (for example Amazon CloudWatch Logs, Amazon SQS or AWS Secrets Manager) from private subnets should use that service's interface endpoint with private DNS, because its per-GB rate is far lower than NAT processing.
- Low-traffic environments pay mostly the per-AZ hourly fee. Two levers cut that fee: S3 and DynamoDB traffic that stays inside the VPC can use free gateway endpoints instead of interface endpoints, and where a workload can tolerate losing endpoint access if one AZ fails, fewer endpoint subnets mean fewer AZ-hours. Production VPCs normally keep an endpoint ENI in every AZ they use.
- Private Amazon ECR pulls need three endpoints: interface endpoints for
ecr.apiandecr.dkr, and an S3 gateway endpoint, because image layers are stored in S3.
Centralized endpoints: the break-even
Sharing one set of interface endpoints in a central VPC across many spokes through AWS Transit Gateway avoids paying endpoint hours in every VPC, which suits many low-volume spokes. But each GB from a spoke then also pays transit gateway processing. For one very high-volume VPC, a local interface endpoint for that service costs less than routing its traffic through the hub, so leave other spokes on the shared endpoints and give the heavy VPC its own. (The routing and DNS design of centralized endpoints is covered in the SAP-C03 network architecture lesson; this lesson covers only the cost decision.)
NAT gateway placement and Availability Zone-aware architectures
Inter-AZ data transfer is charged in each direction, so an AZ-aware architecture keeps traffic in the AZ where it starts whenever availability does not require crossing.
One NAT gateway per AZ
A single zonal NAT gateway shared by private subnets in three AZs makes two-thirds of the egress cross an AZ boundary, adding inter-AZ charges, and makes one AZ a single point of failure. Creating a NAT gateway in each AZ and routing each AZ's private subnets to the NAT gateway in the same AZ removes both problems.
Regional NAT gateways (2025) span AZs automatically: they need no public subnet and expand into an AZ when workloads appear there. That expansion can take up to 60 minutes, during which traffic from the new AZ is processed across zones and pays inter-AZ charges. They also contract out of an AZ that no longer has active workloads, so a fleet that repeatedly starts in an otherwise empty AZ can meet the expansion window again on each run, paying cross-zone processing every time. They do not support private NAT. For bursty, short-lived workloads in an otherwise empty AZ, zonal NAT gateways in each AZ avoid the cross-zone window; for steady workloads in fixed AZs, the regional gateway reduces management.
Keeping service-to-service traffic in-zone
- Amazon MSK rack awareness: by default Kafka consumers read from the partition leader, often in another AZ. Set
replica.selector.classtoorg.apache.kafka.common.replica.RackAwareReplicaSelectorin the cluster configuration and setclient.rackon each consumer to its AZ ID (for exampleuse1-az1), and consumers fetch from a same-AZ replica. Replication between brokers inside an MSK cluster is not charged as data transfer. - Kubernetes topology-aware routing: setting
trafficDistribution: PreferCloseon a Service (or the older topology-aware routing hints) makes calls prefer endpoints in the caller's zone, while still falling back to other zones. - Load balancers: with Network Load Balancer cross-zone load balancing turned on, traffic sent to targets in other AZs incurs inter-AZ charges; when every AZ has healthy targets, turning it off keeps each node's traffic local. Application Load Balancer traffic to targets in other AZs is not charged as inter-AZ transfer, so ALB cross-zone is not a cost lever.
Transit Gateway, VPC peering, PrivateLink and VPC Lattice pricing models
The four ways to connect VPCs charge for different things, so the cheapest choice depends on how much data flows between which pairs.
| Option | Pricing model | Cost fit |
|---|---|---|
| AWS Transit Gateway | Per attachment-hour plus per-GB data processing on data sent from VPC, VPN and Direct Connect attachments, charged by default to the owner of the sending attachment (flexible cost allocation can assign it to another account); no processing for data sent from a peering attachment; inter-Region transfer applies across peered gateways | Hub for many VPCs, routing control, hybrid connectivity |
| VPC peering | No hourly or processing charge; only data transfer (none within the same AZ, inter-AZ and inter-Region rates otherwise) | Heavy traffic between a specific pair of VPCs |
| AWS PrivateLink | Consumer pays its interface endpoint per AZ-hour and per GB; provider pays for its Network Load Balancer | Exposing one service to many consumers, including overlapping CIDRs, without sharing routes |
| Amazon VPC Lattice | Per service-hour, per GB processed and per request | Service-to-service networking with auth policies across VPCs and accounts |
Hub plus direct peering
Transit Gateway processing is charged per GB, so any two VPCs that exchange a large, steady volume (for example a central log archive and a security analytics VPC) pay that processing on every byte. Keep Transit Gateway as the hub for everything else and peer the heavy pair directly, routing each other's CIDR through the peering connection; more specific routes win, so only that pair's traffic moves.
Inter-Region flows
For traffic from a VPC in one Region to a VPC in another through peered transit gateways, processing is charged once, at the sending side's transit gateway when the data enters from the VPC attachment, plus inter-Region data transfer out of the source Region. The receiving transit gateway does not charge processing for data arriving over the peering attachment.
PrivateLink
When a central team exposes an API to many consumer VPCs, some with overlapping CIDRs, PrivateLink fits: publish the API as an endpoint service behind an NLB, and each consumer creates its own interface endpoint and pays for it. No routes are exchanged, so overlapping address space does not matter, and the provider does not carry consumers' endpoint costs.
Hybrid egress: AWS Direct Connect versus VPN
For large, steady flows from AWS to on premises, AWS Direct Connect is cheaper per GB than Site-to-Site VPN, because data transfer out over Direct Connect is billed at Direct Connect rates, which are well below the internet data transfer out rates that VPN traffic pays. VPN adds its own connection-hour fee. If a Direct Connect connection already exists, routing heavy analytics exports over it rather than over VPN lowers the bill without new infrastructure.
The rate is a property of the path. Anything that keeps the traffic on the internet-based VPN, whether it adds speed or bandwidth, keeps internet egress rates and may add fees of its own; a managed copy service adds its per-GB fee on top of whichever path carries the bytes. Only moving the bytes onto Direct Connect changes the egress rate.
Reaching Amazon S3 from on premises over Direct Connect
| Path | Charges |
|---|---|
| Public virtual interface to S3 public endpoints | Data transfer out to public prefixes owned by the same payer account is billed at Direct Connect rates; no endpoint fee |
| Private (or transit) VIF to an S3 interface endpoint | Direct Connect rates plus the endpoint's per-GB processing and hourly fees |
| S3 gateway endpoint | Not reachable from on premises |
So for on-premises access to your own S3 data at volume, a public VIF is the lower-cost path; choose the interface endpoint when private IP addressing or a no-public-route policy is the stated requirement.
Cost-aware multi-Region replication: S3 and DynamoDB
Replication costs scale with what you copy and how many copies you keep, so a cost-aware design replicates only the data that needs a second Region and stores the copy in the cheapest form that still meets its access need.
Amazon S3 Cross-Region Replication levers
S3 Cross-Region Replication (CRR) bills inter-Region data transfer, requests at the destination and storage of the replica. Three settings control the bill:
- Filters: scope each rule with a prefix or object tag filter so only the data that needs a copy is replicated.
- Destination storage class: a rule can store replicas in a cheaper class. For a rarely read copy that must still return in milliseconds, S3 Glacier Instant Retrieval fits; S3 Glacier Deep Archive is cheaper but restores take hours, so it fails a fast-read requirement.
- S3 Replication Time Control (RTC): gives a replication SLA with metrics and is billed per GB replicated under rules that enable it. RTC is set per rule, so split rules by SLA and enable it only on the prefixes or tags whose data needs the guaranteed replication time.
Existing objects are not replicated by a new rule; S3 Batch Replication copies them as a one-time job.
Amazon DynamoDB global tables cost
A global table bills every write again in each replica Region as a replicated write, plus inter-Region transfer and storage in each Region, so its write cost is roughly writes multiplied by replicas. To cut it:
- Remove replicas in Regions that no longer serve users.
- Keep frequently updated attributes that only matter in one Region in a separate single-Region table, and write the global item only when data the other Regions need changes.
- Remember that TTL deletes are free in the Region where they happen but replicate to the other replicas as replicated writes.
- Amazon DynamoDB Accelerator (DAX) caches reads; it does not reduce writes or replication.
- Multi-Region strong consistency (MRSC) still replicates every write and is available only in three-Region configurations, so it is never a cost saving.
Disaster recovery without a global table
Global tables are for active-active workloads or seconds-level RPO. When hours of RPO and RTO are acceptable, a cheaper design keeps a single-Region table and uses AWS Backup to copy backups to a vault in another Region (cross-Region copy of DynamoDB backups needs AWS Backup advanced features for DynamoDB). Point-in-time recovery can restore to another Region, but its backups live in the source Region, so it cannot help if that Region is unavailable. Table class choices change storage and throughput pricing, not where a recoverable copy lives.
Data transfer for AI/ML workloads: cross-Region inference and data locality
AI workloads add two data transfer decisions: where model inference runs, and where model artifacts and training data are read from.
Amazon Bedrock cross-Region inference
Cross-Region inference sends on-demand requests through an inference profile that can route them to other Regions with capacity. AWS charges no extra routing or data transfer fee for it, and tokens are billed at the price of the source Region you call from.
| Profile | Where requests can run | Price |
|---|---|---|
| In-Region (no profile) | The source Region only | Standard on-demand price |
| Geographic (for example US, EU) | Regions inside that geography | Standard price of the source Region; more throughput |
| Global | Supported commercial Regions worldwide | Lower per token than geographic or in-Region (AWS cites about 10% for Claude Sonnet 4.5) |
With no residency constraint and real-time traffic, the global profile is the cheaper choice. When data must stay inside a geography such as the EU, the geographic profile adds throughput at standard pricing without leaving it. Other Bedrock pricing options solve different problems: batch inference lowers per-token price for supported models but returns results asynchronously, and Provisioned Throughput is a capacity commitment that inference profiles do not use. (Controlling which accounts may use cross-Region profiles, and residency guardrails, belong to the security and governance lessons.)
Keep AI data next to the compute that reads it
Model weights and training datasets are large and read repeatedly, so reading them across Regions pays inter-Region transfer on every node start or every job. Move them once instead: replicate the bucket (for example with S3 replication) to each Region where they are read, point the inference nodes or training jobs at the local copy, and read it through an S3 gateway endpoint so the reads skip NAT processing. Each new model version then crosses Regions once.
The test for any alternative is whether each read still leaves the Region. If it does, the inter-Region transfer repeats on every read however the request is routed or accelerated, and routing or acceleration features add their own per-GB fee on top. Gateway endpoints help only after the copy is local, because they reach same-Region buckets only.
Tip. Task 3.2 questions describe a multi-account or multi-Region estate with a data transfer or network line item that has grown, and ask for the change that lowers it while meeting stated constraints such as no blocked viewers, no public IPs, keeping three AZs, least change, no commitment, real-time responses, data residency or an RPO. Several are Select TWO, pairing two levers that act on the same data path. Some items give a bill or traffic pattern and ask which meters apply, so know which side of a flow pays processing and transfer, which paths each endpoint type can reach, and which features add their own per-GB or hourly fees.
- Transfer from AWS origins to CloudFront is free and CloudFront rates are below S3/EC2 internet egress, so cacheable content belongs behind CloudFront.
- Cache key = only what changes the response; forward everything else with an origin request policy, compress at the edge and give versioned assets long TTLs.
- Origin Shield is set per origin, in the Region nearest that origin; keep dynamic paths off it and enable it on every origin in an origin group.
- A price class narrows the edges you pay for without blocking anyone; geographic restriction blocks viewers.
- S3 and DynamoDB gateway endpoints are free but same-Region only; interface endpoints cost per AZ-hour plus a per-GB rate far below NAT processing.
- Run one NAT gateway per AZ with same-AZ routes, and keep traffic in-zone with MSK rack awareness, PreferClose routing and NLB cross-zone off.
- Transit Gateway charges processing on data sent from VPC, VPN and DX attachments; peer heavy VPC pairs directly and keep the hub for the rest.
- PrivateLink: the consumer pays its endpoint, the provider pays its NLB, and overlapping CIDRs are fine.
- Replicate only what needs a copy: S3 filters, a cheaper destination class and RTC only on rules that need the SLA; global table writes cost roughly writes x replicas.
- For AI, the global Bedrock inference profile is cheapest when residency allows; replicate model artifacts once to each Region that reads them.
Frequently asked questions
Is data transfer from Amazon S3 to Amazon CloudFront free?
Yes. Data transfer from AWS origins such as Amazon S3, Application Load Balancers and Amazon EC2 to CloudFront edge locations is not charged. You pay CloudFront's delivery rates for data sent to viewers, which are lower than S3 or EC2 data transfer out to the internet, and cache hits never reach the origin, so serving cacheable content through CloudFront usually lowers the total egress bill.
When should I enable CloudFront Origin Shield?
Enable Origin Shield on origins that serve cacheable content to viewers in many geographies, or that are expensive to hit, such as just-in-time video packagers, image processors, on-premises origins or origins shared by several CDNs. Choose the Origin Shield Region with the lowest latency to that origin. Avoid sending dynamic requests through it, because those always incur an Origin Shield request charge; Origin Shield treats writes, caching-disabled requests and GET or HEAD requests with a TTL under 3,600 seconds as dynamic.
What is the difference between a CloudFront cache policy and an origin request policy?
A cache policy defines the cache key and TTLs, so every header, cookie or query string in it creates separate cached copies. An origin request policy forwards additional headers, cookies and query strings to the origin without adding them to the cache key. Keeping the cache key minimal and forwarding the rest through an origin request policy raises the cache hit ratio and lowers cost.
Do S3 gateway endpoints cost anything, and do they work across Regions?
Gateway endpoints for Amazon S3 and Amazon DynamoDB have no hourly or per-GB charge. They only reach buckets and tables in the VPC's own Region; traffic to another Region's bucket follows the default route, for example through a NAT gateway. They also cannot be used from on premises or through peering or a transit gateway, where an interface endpoint is needed instead.
How do I avoid NAT gateway inter-AZ data transfer charges?
Create a zonal NAT gateway in each Availability Zone and route each AZ's private subnets to the NAT gateway in the same AZ. This removes inter-AZ transfer and the single point of failure of a shared NAT gateway. Regional NAT gateways expand into AZs automatically, but expansion can take up to 60 minutes, during which traffic is processed across zones, and they contract out of AZs with no active workloads, so short-lived fleets in an otherwise empty AZ can pay that cross-zone processing on every run.
Is Transit Gateway or VPC peering cheaper?
VPC peering has no hourly or data processing charge, only data transfer, while Transit Gateway charges per attachment-hour and per GB processed on data sent from VPC, VPN and Direct Connect attachments. For a pair of VPCs exchanging a lot of data, direct peering is cheaper; Transit Gateway remains the better hub for many VPCs and hybrid connectivity, and both can be used together.
How can I reduce DynamoDB global tables cost?
Every write is billed again as a replicated write in each replica Region, so remove replicas that no longer serve users and move frequently updated data that only one Region needs into a single-Region table. TTL deletes also replicate as replicated writes. If hours of RPO are acceptable, replace the global table with AWS Backup cross-Region copies of a single-Region table.
Does Amazon Bedrock charge for cross-Region inference?
No extra routing or data transfer fee is charged; tokens are billed at the source Region's price. Geographic profiles such as US or EU keep standard pricing and stay inside that geography, while the global profile is priced lower per token for supported models but may run requests in any supported commercial Region, so it fits only when there is no residency constraint.
Source
This lesson covers the "Cost-Optimized Architecture Design" domain of the official SAP-C03 exam guide. Vendors revise their guides — check the source for the current version.
- AWS Certified Solutions Architect – Professional (SAP-C03) exam guide — Amazon Web Services
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.