Shafail Shafa

← All case studies

Server care Migration · 2021 · Upwork

A PHP REST API put on AWS, then moved to serverless

I stood a PHP REST API up on an AWS virtual server, then migrated the same API to a serverless setup with a managed database behind it.

The objective

The work was part of a structured study the client was running. A LAMP-based REST API had to go up on an AWS virtual server, set up through the web console and over SSH, and then move to a serverless environment with a managed database.

The second half is the part worth talking about. Moving a PHP application off a server you control changes what you're allowed to assume. There's no local filesystem to write to, no process that stays running, and the way you handle database connections has to change with it.

What I did

I set up the LAMP virtual server through the AWS console and SSH and got the REST API running on it.

Then I migrated the same API to the serverless environment with its managed database.

Most of the effort went into the spots where the application quietly assumed a server that was always there, and I worked those out one at a time.

The result

Both deployments came out working. The client's own note afterwards was that they'd work with me again.

“Freelancer did a great job on a LAMP REST API deployment to Amazon Web Services. We'd be happy to work with this freelancer again.”

Upwork client, United States, 2021