I'm looking for a straightforward cloud-based solution to run a Python script continuously without relying on my local machine. My script calls an API for tracking transit vehicles, and I want to ensure that the results are saved reliably. I've heard about AWS Lambda but it's been a bit overwhelming to set up. Here's what I need help with:
* Running a Python script 24/7 without needing my laptop on
* Ensuring the script has continuous internet access to make API calls
* Saving the results from the API calls securely
Is there a simpler approach than AWS Lambda, or some easy setup I'm not seeing? Any recommendations for services or step-by-step tutorials would be appreciated.
5 Answers
Why not just get a Raspberry Pi? It can run your script 24/7 and is probably cheaper than most hosting services.
If you're into Node.js, you might consider writing a small program that runs on Linode hosting. Just make sure to manage your disk space for the API results.
Setting this up on a cheap VPS would be my go-to. You don’t really need those complicated services for what you're trying to do. Just a basic server that's always on will do the job for you.
I agree! A VPS can really simplify things.
Using cron jobs on any VPS will work perfectly. Just remember to modify your script so it executes the API call only once per loop. It should only cost you around $5 a month!
Thanks! That price point sounds solid.
Yeah, cron jobs are super reliable for this kind of task.
You can also set up AWS Lambda with an EventBridge cron trigger. This method can be pretty low-cost and you can get it working without too much hassle.

That sounds reasonable! Do you have any VPS providers in mind?