How to start an AWS EC2 instance using PHP

Over the past week I have been building an API that is very graphics intensive for a highways management company. After leaving a g2.8xlarge EC2 instance running over the weekend, I soon realised that running a G series instance 24/7 waiting for HTTP requests is going to get very expensive, very quickly. So after looking into the AWS PHP SDK I found out that you can boot an EC2 instance using PHP.

This means my API can use a cheap t2.micro instance to run a web server and listen for API calls. When a call is received, I can boot-up the GPU enabled instance to process data and automatically stop it when it’s not needed, dramatically reducing the cost.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.