- Newest
- Most votes
- Most comments
Hello.
As you know, using CloudFront for caching reduces the number of requests to S3.
In cases like this, where there is a lot of access and a lot of data transfer, I think it is often cheaper to distribute from CloudFront.
As shown in the pricing table below, CloudFront is set up so that the more data you transfer, the cheaper the charges will be.
https://aws.amazon.com/cloudfront/pricing/?nc1=h_ls
Your cost structure sounds rather straightforward. The request fees for just 4 million requests would be on the order of a few dollars/euros per month, so the bulk of your costs should be coming from data transfer out to the internet. Data transfer from S3 origins to CloudFront edge locations is free, with the traffic charges applying instead to the traffic from the CloudFront edge locations to your users.
The list prices for traffic outbound to the internet aren't significantly different for CloudFront (in the price class 100, assuming it's suitable for you) compared to S3, but as you can see at the bottom of the CloudFront pricing page https://aws.amazon.com/cloudfront/pricing/, the first 1 TB of traffic and the first 10,000,000 requests are free, meaning that the price list applies to usage exceeding those amounts. That might be notable if your use is relatively small.
For example, your 4 million requests would all be covered for the per-request fees, with only the requests made by CloudFront to S3 when the requested file isn't available in CloudFront's cache getting charged. The amount of data traffic you didn't mention, so I can't say what fraction of it CloudFront's free 1 TB would be, but that would get charged based on the CloudFront pricing sheet for the amount exceeding 1 TB.
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago