Reputation: 9030
I have started an Ubuntu EC2 free tier server. It has one purpose - to monitor a different server. It runs a cron job every minute which performs a ping
and a curl request
to one server.
The purpose is if the ping result is 0 or the curl response http code is faulty it then sends an email using SES to various people.
My question is, will this action occurring every minute eventually exceed the free tier allowed usage per month?
Upvotes: 0
Views: 54
Reputation: 269101
You could Create an Amazon Route 53 Health Check and have it check the endpoint for you. If a check fails, this is reported in Amazon CloudWatch.
You could then configure a CloudWatch alarm to activate when the health check fails, and it can send a message to an Amazon SNS topic. You could subscribe people to the topic to receive notification that the health check failed.
All up, it should cost a couple of dollars per month.
Upvotes: 0
Reputation: 68715
Yes it will, the free tier is not free forever and it is free only for 744 hours for 12 months. Bear in mind that this is applicable for your account, which means if you have 2 free tier instance the free hours are consumed not individually but collectively.
IMO, it is an overkill to run an ec2 instance 24 hours a day when it is not used the whole time.
Better solution design for this problem will be to create a lambda and a cloudwatch schedule triggers. You will pay for the compute that you need and not waste by claiming it all the time. Also, the AWS Lambda free usage tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.
Upvotes: 2