Why did my AWS script stop running after a few hours?
Asked by
12 songs rehearsed
I'm new to AWS and recently deployed my first Python script that gathers data from a web page and sends an email. I've set up a crontab to run this script every 2 minutes for testing purposes. It initially ran fine for a few hours, but then it suddenly stopped. How can I find out what went wrong? I'm using EC2 instances for this setup.
Answers
Make sure you're aware that AWS blocks outbound traffic on port 25 by default. If you're trying to send emails from your EC2 instance and haven't hosted your own email server, that could be an issue.
Reply to this answer
Have you set up logging for your script? It's possible that the script crashed at some point, and logging would help you trace what happened.
Reply to this answer
Check the cron and script logs to see if any errors were logged. If your script doesn't currently log activity, consider adding logging to help troubleshoot in the future.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions