Build out AWS VPC with EC2 and RDS
Goal: Build out my AWS VPC and add EC2 for compute with access to a MariaDB RDS
Duration: 4 days. I’ve been through multiple lessons on how to do setup VPC, how to setup RDS, how to setup EC2. This was my first unguided attempt at putting them all together to prove I know these components of AWS.
VPC has 6 subnets across 3 AZs . 2 subnets per AZ, no AZ has same subnet type. This way I am mutli-AZ for each of the following: 2 Public Subnets(for Application Load Balancer,); 2 Database Subnets (for Multi AZ Maria DB); 2 Application Subnets for compute.
Install and setup Maria DB on the database subnets.
Standup up EC2 instance. Install httpd and wordpress. This gives the project more purpose as this will support briansill.com!
Standup Application Load Balancer on public subnets and pass http to EC2.
Attach ALB to briansill.com using Route 53.
Use AWS Certificate Manager to get certs for HTTPS into briansill.com. Tie them in using Route 53.
Couple of gotchas:
–> I originally thought I could do this with just 3 subnets, 1 public, 1 db, 1 app. Quickly learned best practice is to have two public, two db and 2 for app.
–> WordPress running behind application load balancer that is receiving https and passing through http to WP worked fine for viewing page. When time came to login to make edits to web site, got too many redirects. This took a few hours to find the right tip on what needs to be added to wp-config to use https even though it detected http.
Next project will be more AWS, something along the lines of API gateway for a Spring AI service I built last month, time to get this on the web.
