What's the Best Cloud Solution to Run My Python Script 24/7 for API Calls?

December 14, 2025 5 answers
Asked by WanderingCoder92
I'm looking for an easy way to run a Python script that makes API calls every minute, 24/7, and to save the results. I've played around with AWS Lambda, but dealing with boto3 for S3, setting up a VPC for connectivity, and navigating the new tools has been frustrating. I already have a Python script that works fine on my local machine, but I don't want to rely on my laptop being on all the time, especially since I'm working with transit vehicle tracking data that I need to keep consistent. I've signed up for PythonAnywhere but am wondering if I'm missing something that could simplify this. What's the quickest approach to: * Ensure my Python script runs 24/7 without dependency on my computer * Access the internet for API calls * Save the API results efficiently? Is there a simpler setup with AWS Lambda that I'm overlooking, or is there a straightforward tutorial or another service that's easier?

Answers

SimpleCloudUser99
A VPS could simplify things significantly for you. It's relatively low cost and gives you the flexibility to run any applications you need, like Python or Docker.
Reply to this answer
CloudAficionado77
If youโ€™re looking for a cloud option, spinning up an EC2 instance might be your best bet. Just upload your Python script there, and you can run it directly. It's straightforward: SSH in, run it in a `screen` or `tmux` session to keep it alive, or use a systemd unit file to start it automatically on boot. You'll have full control over the environment.
Reply to this answer
VPSExplorer22
Getting a cheap VPS is another alternative. Services like Lightnode offer hourly billing, so you can run your scripts without any long-term commitment, and it's pretty easy to set up.
Reply to this answer
GadgetGuru88
You might want to consider using a Raspberry Pi, especially a model 3B+ or newer. They're great for running scripts continuously and are super cheap. Plus, you wonโ€™t have to deal with any cloud services that can be a bit of a hassle.

DevEnthusiast44: Totally agree! I've been running a few Raspberry Pis at home for over a year now, and they just keep on going without any issues.

TechNinja75: Yep! I've got a Raspberry Pi that's been running my bots non-stop for a couple of years now. It's definitely a solid option.

Reply to this answer
DataSleuth41
How are you planning to retrieve and store the data once youโ€™ve saved it? That part can vary based on what services you choose.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions