Find the expensive hop in a request
Trace traffic by AZ, service and destination and compare fixed and per-byte charges.
Task 4.4 · Find the expensive hop in a request
Reconstruct the bill
Sketch one request and its reply, label each AZ and Region, and estimate bytes per hop. Consult usage-type line items and Cost Explorer. Fixed hourly services, NAT processing, inter-AZ or inter-Region transfer, public addresses and internet egress can all matter. Check current service-specific exemptions. Use VPC Flow Logs and workload metrics to locate heavy paths. Apply cost allocation tags where supported and route unexplained changes to the workload owner.
Keep appropriate traffic on efficient paths
An S3 or DynamoDB gateway endpoint can remove eligible same-Region traffic from a NAT path without endpoint hourly or processing charges. Interface endpoints usually have hourly and processing charges, so compare actual usage. One zonal NAT gateway per AZ can keep traffic local and isolate failures, but increases fixed charges. Compare a shared gateway for low-volume environments where the failure model permits it. A NAT instance also brings patching, scaling and failover responsibilities.
Decide whether to cache, connect or throttle
CloudFront reduces origin bytes for cacheable content. Pick a cache key, TTL and invalidation policy that preserve correctness. Peering can be economical between a few VPCs; Transit Gateway simplifies a larger topology but adds attachment and processing costs. Compare internet VPN and Direct Connect including ports, provider fees, utilization, backup paths and lead time. Evaluate multiple connections for capacity and resilience. API Gateway throttling or application quotas can bound nonessential bursts. Account for client retries and legitimate peaks.
Measure the throttling and cache tradeoffs
Set an API rate and burst allowance from legitimate peak traffic and protect essential consumers from optional refresh traffic. Usage-plan quotas are best-effort controls. Use separate billing alarms and hard application controls when strict spending limits apply. For cacheable assets, estimate hits multiplied by bytes avoided at the origin and add edge request and delivery charges. Check the billed usage types after release. A personalized response must stay isolated by the relevant authorization and request attributes.
The network bill rose with an analytics export
Two private AZs write 30 TB of same-Region data to S3 through a zonal NAT in one AZ. The application also calls a public partner API. A team proposes moving the entire workload into one AZ to save money.
How can the large path change while preserving resilience and partner access?
Compare your design with the worked answer
Associate an S3 gateway endpoint with both private route tables and restrict endpoint and bucket policies to the intended actions. S3 traffic then follows its more specific route; the default NAT route continues serving the partner API. Compare NAT bytes and inter-AZ charges before and after with comparable load.
If the high-volume destination were a partner SaaS service offering PrivateLink, price its interface endpoints, data processing and AZ placement against the NAT path first.
Apply the video example
The CloudFront example mentions cache-key normalization. If a query parameter tracks a campaign but never changes public content, excluding it from the key can raise hit ratio. Keep parameters that affect the response or authorization isolated. Use logs to compare hit ratio, origin bytes and cost for the same traffic mix.
freeCodeCamp at 22:25:37 · CloudFront cache keys
AWS exam guide for this domain · Return to the objective map
Find the expensive hop in a request quiz
Answer 5 questions. Check each answer for an explanation.