Q:

Have a script running regularly in AWS

I've been fiddling around with AWS for the past two days, to see what I can do with it and how it would fit my needs.  I've already installed LAMP (I installed WAMP on my own computer a long time ago) and R, Rserver & Shiny server. 
I was wondering if there is a way to have a script running on a regular basis (every X seconds), and if so, how ? 
(In case it's relevant : it's a script I currently have in PHP, but I could translate it in R. It's using curl and it needs to read and write data to a MySQL database.) 
Thanks

A:

If you have an EC2 instance, you could schedule it using cron.  
If you want to use AWS in general, I suggest that you use Lambda with scheduled events.  
The first method needs you to have running infrastructure (an EC2 instance), but is easier.  The second method has a bit of a learning curve.