Getting started
I have a pretty good understanding of most areas of web development. I spend my days mostly writing PHP, but over the years I've also made an effort keeping up to date with frontend standards, and I get by.
But when it comes to infrastructure, I am almost completely out of my depth. The main reason for this is that unlike writing code, you can't really set up commercial grade infrastructure on your laptop. So you either have to pay for AWS, or have an employer do so.
So how have I been hosting my projects until now? Well, mainly through services that handle the infrastructure on my behalf, like Laravel Forge, or Fly.io. I bring the code, and they take care of the rest. But every company I've worked at, have made use of AWS or similar providers, to ensure they have the maximum available flexibility when it comes to deploying their code. And typically, this has always been someone else's job to set up. So I bring my code, and they take care of the rest.
The idea
I have decided to finally change this. I don't necessarily want to be able to start contributing to setting up an employer's infrastructure. Instead, I'd like to at least have an idea of how it is set up, and be able to set up something minimal for myself. That means learning about the minimum required AWS services, and a way to implement it. I could set it up manually through the AWS admin console, but that way lies madness, and I doubt anyone has done that since infrastructure-as-code became a thing.
That means learning to use an IaC tool like Terraform, AWS CloudFormation, CDK, Pulumi, etc. I've used Terraform in a minimal way in the past, so that seemed like a solid choice. Even though I don't use it at my current employer, it is still a solid choice and a good tool to learn.
The plan
So how do I get there? And what do I actually deploy, so that I have something to point to at the end and say "I did that"? Once I have that, I then need to figure out which AWS services would be needed to get a Docker container up and running, and how to get them running using Terraform.
The stack
I decided to keep the learning part to infrastructure and IaC only, so this is a minimal PHP app built on Symfony and running in Docker using FrankenPHP. No database, no additional services, just a single container.
It also means I can get away with just using ECS and Fargate on the AWS side, and then just need to figure out how to use Terraform to provision and manage these and their required dependencies.
Once it's provisioned, I can then build my app, push the built image to ECR, and deploy from there.