I spent some time over the course of this past week migrating my entire online ecosystem to AWS. There was talk at work about using the AWS SQS for some pushes that we have for various objects to various back-end service providers. I already have a CDN at AWS, so I took the opportunity to migrate a piece at a time.
I started by moving DNS to Route53. I created a new CloudFront for my static site and requested some new certificates using ACM. Once I got certs applied to the new CloudFront instance, I moved my static site (this one) to S3. I shuffled the DNS around to point to the right place. I’d spent some time awhile back with GitLab’s pipelines to automatically deploy this Jekyll site. Now I’ve got a dilemma: at this point because I couldn’t automatically deploy to S3 from GitLab. I could; I just wasn’t sure how. More on this later.
The other project I took on was getting familiar with RDS and EC2. I started by pointing the existing site (not on AWS) to the RDS instance. I got that working, then recreated my WordPress install on EC2. I got that working, but certs were broken… 😕 The whole reason I switched to ACM was to keep from having to upload new certs through the AWS CLI each time I needed to renew. After some quick research, I discovered that ACM can manage certs automatically but only for Elastic Beanstalk and load balanced instances. Oi! I guess I’m going to get real comfortable with AWS!
I did some reading on ELB and got everything sorted out there for a WordPress install. After some trial and error, I finally got it working on Saturday morning. This was the trickiest part, not due to anything AWS related, but in how I wanted my SSL to work. I don’t want anything non-SSL on any site. After some finagling of the WordPress database, and a lot of tinkering with the ELB environment and load balancer, I’ve got it working exactly how I want it.
Now, back to CI for my static site. Naturally I started with the code repository. I moved the repo to CodeCommit, created a CodeBuild project, then automated all of it with CodePipeline. This was the easiest part of the whole process, and it put a big smile on my face. Even this post has been automatically deployed using all of the magic above. Git push, and we’re on our way.
- Moved DNS to Route53
- Moved SSL certs to ACM
- Moved static professional site to S3
- Moved WordPress family site to ELB with load balancer (like we’ll ever need it 😉 )
- Moved repos for both sites to CodeCommit
- Automated deployment for each site to ELB and S3 with CodeBuild and CodePipeline respectively
- All of the above include establishing IAM roles and policies to ensure appropriate access for every service involved in the processes
After some lengthy evenings (in the midst of trying to buy a house!), I was done…at least for now. It was frustrating at times because I was in some very new and foreign territory to me. Thanks to lots of tutorials, I was successful.
I was very pleased with the entire experience, though. Amazon has made it incredibly easy to onboard into their ecosystem…almost too easy. It was an extremely fun project. Their documentation is stellar. The community around it is also very active and seems to provide lots of helpful tips. I’m not on a paid support plan, so it took a little bit of digging to find the answers I needed, but I can’t see myself moving from AWS for quite awhile.