1) Types Of Data Transfer (DT)
Internet
Data Transfer cost Out to the Internet depends on the AWS region
Up to 100 Gb of DT Out per month is free (under Free Tier)
Data Transfer cost In from the Internet is free
Between AWS Regions
Data Transfer out to another AWS region depends on the originating AWS region
Data Transfer In from another AWS region is free
Between Availability Zones within AWS Region (inter-AZ/Regional):
You pay for both In and Out charges between AZS
Within one AZ data transfer is free when using private IPs
Data transferred between EC2, S3, RDS, Redshift, ElastiCache or Elastic Network Interfaces in the same AZ is free
CloudFront
Up to 1 Tb of DT Out per month is free (Free Tier)
DT from CloudFront edge location to the origin (backend resource) is charged
DT from the origin to edge location is free
Direct Connect
DT from AWS Region to AWS Direct Connect location is charged and depends on the region and location DT in from AWS Direct Connect location to AWS Region is free
2) Data Transfer Usage type in Cost Explorer.
2.1) Data Transfer (Internet) in Cost Explorer.
Internet
– DT out to the Internet: Usage Type LIKE DataTransfer-Out-Bytes
– DT in from the Internet: Usage Type LIKE DataTransfer-In-Bytes
2.2) Data Transfer (Between AWS Regions) in Cost Explorer
Between AWS Regions:
– DT out to another AWS region: Usage Type LIKE AWS-Out-Bytes
– DT In from another AWS region: Usage Type LIKE AWS-In-Bytes
2.3) Data Transfer (Regional/Inter-AZ) in Cost Explorer
Between Availability Zones within AWS Region (inter-AZ/Regional):
– DT In and Out AZ: Usage Type LIKE DataTransfer-Regional-Bytes
– Includes traffic within same AZ using public IP, and Inter-AZ VPC Peering
– Traffic over VPC Peering inside same AZ is Free
2.4) Data Transfer: CloudFront
Internet:
– DT out to the Internet: Usage Type LIKE DataTransfer-Out-Bytes
– DT In from the Internet: Usage Type LIKE DataTransfer-In-Bytes
From CloudFront edge location to the origin (backend resource):
– Usage Type LIKE DataTransfer-Out-Bytes
Origin-CloudFront Data Transfer In and Out:
DT Out: Usage Type LIKE CloudFront-Out-Bytes
DT In: Usage Type LIKE CloudFront-In-Bytes
3) AWS Cost Management
Đầu tiên bạn phải có permission để access vào AWS Cost Managment.
Nếu bạn click vào Preferences được thì bạn đã có phép.
Bạn nhập từ DataTranfer và tìm hiểu các thông tin về datatransfer.
4) Optimization Tips and Recommendations
4.1) Data Transfer Optimization: AWS Regions
- Use private IPs & VPC Endpoints when possible
- Place NAT GW in the same AZ with the backend instances where possible (Knowledge Center)
- Review cross-AZ load balancing traffic (see ELB FAQ for cross-AZ charges info) ·
- Review cross-region data usage (especially between EC2 and S3)
4.2) Data Transfer Optimization: CloudFront
Large DT Out Example: You have 10 TB of S3 storage in US East (N.Virginia) region which you need to copy to a destination that will generate Internet traffic. Reference: https://calculator.aws/
S3 & ELB Optimization:
– Limit unused ELBS across AZS
– Disable ELBs with no healthy or no backend instances
– S3: Compress data to reduce data transfer size
– Use CloudFront for large DT Out use cases
5) Useful Tools and Resources for Further Deep Dive
Cost Allocation Tags
– Help grouping resources into categories and monitoring charges related to those groups in Cost Explorer and other tools https://docs.aws.amazon.com/awsaccountbilling/ latest/aboutv2/cost-alloc-tags.html
Cloud Intelligence Dashboards
– Get detailed insights of your cost and usage across multiple services, accounts and dimensions (based on your Cost and Usage Report), including Data Transfer https://wellarchitectedlabs.com/cost/200_labs/200_cloud_intelligence/