Search code examples
wordpressamazon-web-servicesamazon-ec2amazon-rdsamazon-cloudfront

AWS wordpress - calculating network data transfer charge


I'm trying to calculate the price of network data transfer in and out from an AWS WP website.

Everything is behind Cloudfront. EC2/RDS returns dynamic resources and few statics, S3 returns only static resources. The Application Loadbalancer is there just for autoscaling purpose.

Even if everything seems simple the experience taught that the devil is in the detail. So, at the end of my little journey (reading blogs and docs) I would like to share the result of my search and understand what the community thinks of.

Here is the architecture, all created within the same region/availability zone (let's say Europe/Ireland):

AWS WP Website Architecture

At time of writing, the network data transfer charge is:

For the rest, within the same region is free of charge and Cloudfront does not charge the incoming data.

For example: within the same region, there should be no charge between an EC2 and an RDS DB Instance.

Do anyone knows if I'm missing something? There are subtle costs that I have to oversee?


Solution

  • Your question is very well described. Thanks for the little graph you drew to help clarify the overall architecture. After reading your question, here are the things that I want to point out.

    1. The link to the CloudFront data transfer price is very outdated. That blog post was written by Jeff Barr in 2010. The latest CloudFront pricing page is linked here.

    2. The data transfer from CloudFront out to the origin S3 is not free. This is listed in "Regional Data Transfer Out to Origin (per GB)" section. In your region, it's $0.02 per GB. Same thing applies to the data from CloudFront to ALB.

    3. You said "within the same region, there should be no charge between an EC2 and an RDS DB Instance". This is not accurate. Only the data transfer between RDS and EC2 Instances in the same Availability Zone is free. [ref]

    Also be aware that S3 has request and object retrieval fees. It will still apply in your architecture.

    In addition, here is a nice graph made by the folks in lastweekinaws which visually listed all the AWS data transfer costs.

    Source: https://www.lastweekinaws.com/blog/understanding-data-transfer-in-aws/