简体   繁体   中英

Need details on how aws data transfer costs are calculated using S3

We're making a social media app using amplify and are newbies to aws. The services we're using include s3, auth, hosting, analytics, api and lambda functions. We've already accrued significant data transfer usage and I'm guessing it's from repeatedly grabbing images from S3.

Does Storage.get() which generates a presigned URL count as "data transfer out"

Or does it only count when we actually view the file from the URL?

Is there a difference in data transfer between generating a URL and downloading the actual file with Storage.get?

Generating a URL does not cost anything because it's just a computational operation.

The price of S3 downloads can be computed using the AWS Pricing Calculator . Consider using a CDN such as CloudFront in front of S3. There are many benefits in using a CDN, one of which is pricing.

Major costs associated with S3 :

  1. Storage cost : charged per GB / month. ~ $0.03 / GB / month, charged hourly

  2. API cost for operation of files : ~$0.005 / 10000 read requests, write requests are 10 times more expensive

  3. Data transfer outside of AWS region : ~$0.02 / GB to different AWS region, ~$0.06 / GB to the internet.

Based on volume and region the actual prices differs a bit, but optimization techniques stay the same. I will use the above prices in following cost estimates

Note : Leverage AWS Pricing Calculator as much as you can to save cost. It lets you estimate the cost for your architecture solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM