Python Forum
Python / Web Scraping / Idle AWS Instances
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python / Web Scraping / Idle AWS Instances
#1
I have a Python script that runs daily on an Amazon Web Services instance (Windows) daily to scrape data from a website.

Most of the time the scrape runs successfully without issue and sends a command to shut down the instance once the scrape is complete.

I have several error catching statements throughout the script to try to identify possible failure points & either handle them or just shut down the instance if it's a major error. It's a fairly beefy AWS instance & I of course don't want the instance to sit the running & costing my employer $$$.

However, occasionally the Python script will error out unexpectedly & the window will just sit there without exiting gracefully & the charges unnecessarily continue mounting.

Any experience from u guys on how you handle this sort of thing as to make SURE your AWS instances aren't sitting there running for nothing if your Python script has failed at an unexpected spot & your AWS instance is otherwise sitting there left to run & rack up charges?

Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why can I not see the code correctly in Python IDLE.? Trump 8 642 Apr-04-2024, 07:47 AM
Last Post: jonesphedra
  Launch Python IDLE Shell from terminal Pavel_47 5 1,202 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Python Idle won't start totalmachine 9 3,476 Oct-16-2022, 05:57 PM
Last Post: totalmachine
  Why is IDLE not opening on a MacOS Montery 12.6 and using Python 3.10.7? Merlin385 7 1,658 Oct-08-2022, 08:36 PM
Last Post: Merlin385
  Python: re.findall to find multiple instances don't work but search worked Secret 1 1,202 Aug-30-2022, 08:40 PM
Last Post: deanhystad
  MAC Python IDLE issue shadow12 4 2,516 Oct-29-2021, 12:22 AM
Last Post: shadow12
  Python MYSQL connection does not work after 1h idle zazas321 9 6,725 Oct-07-2021, 12:02 PM
Last Post: ndc85430
  Customize Python Keywords for IDLE alanvers 0 1,990 Apr-03-2021, 10:56 AM
Last Post: alanvers
  Comparison Operator "is" idle vs python command spisatus 3 2,769 Oct-29-2019, 10:00 PM
Last Post: DeaD_EyE
  python script file not opening in IDLE editor srm 2 4,378 Jun-23-2019, 08:45 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020