Search code examples
amazon-web-servicesamazon-s3amazon-cloudfront

Amazon cloude front and unexpected billing amount


I did some experiment with amazon cloud front and it seems that i done some basic things wrong as the total expenses are beyond my expectation and calculation.

I configured S3 bucket and upload all my content to this bucket and configured Amazon cloude front to pick data from here, while for some other files (only css and js) , i took original pull approach.

Avg traffic for my blog was around 100-200 Unique visit per day and which cost me around USD 1-2 per month.

I am hosting some contest this month and traffic has increased significant to 600-700 unique visit per day.

I checked Google analytic as well State counter

StateCounter

Page Loads (Total): 22,728 Google analytic :25,935 (Page view)

But Amazon showing me a bill of around 150+ USD with following information

$0.0075 per 10,000 HTTP Requests 179,211,964 Requests (For US zone)

i am not sure, where i did wrong. Can anyone point or guide me to resource where i can learn about configuring it in proper way :(


Solution

  • You didn't mention looking at the Cloufront logs.

    It would seem like the first step would be enabling the Cloudfront logs... then looking at the logs to identify the source of all of that traffic.

    http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html

    No matter what you're doing, 179,211,962 requests in one month works out to ~69 requests per second every second for the entire month (if my math is good), which does seem dramatically out of proportion to your page loads and views.

    You can also monitor your estimated charges on a continuous basis with Cloudwatch to avoid future surprises.

    http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/monitor_estimated_charges_with_cloudwatch.html