Issue
I'm curious about what this note from Amazon AWS means:
Dear AWS Customer,
Your AWS account has exceeded 85% of the usage limit for one or more AWS Free Tier-eligible services for the month of January.
AWS Free Tier Usage as of 01/28/2020 AWS Free Tier Usage Limit
639 Hrs 750 hours of Amazon EC2 Linux t2.micro instance usage
I have a Python web scraper running from Ubuntu (EC2 instance) that scrapes a website once a day and produces a JSON file. The script is run from crontab so it auto-runs. I'm guessing it takes around 4-5 hours for the script to run per day. Then there's a small script on crontab that also dumps the JSON to amazon s3.
My question is, what is the message above telling me? My scripts are running a total of 639 hours as of 01/28/2020? Is 750 hours the max I have in my tier? If I want to output even more data then I'm currently doing, should I create another EC2 instance? Would I even be able to alter my existing Python script to pull more data, or would this put me over the limit? Generally, I'm confused about how AWS is measuring my usage.
Solution
AWS usage is providing the hour your instance is running not the duration of your cron job.
AWS Free Tier Usage as of 01/28/2020 AWS Free Tier Usage Limit
639 Hrs 750 hours of Amazon EC2 Linux t2.micro instance usage
Since you left your EC2 instance running the whole month it showing the time duration it has been running.
If your cron job only need to be run at certain hour then you can setup cloud watch event to trigger a lambda that will turn your EC2 instance on/off.
Here a reference for that purpose: https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
Answered By - Aatish Sai Answer Checked By - Robin (WPSolving Admin)