Checkout my blog post to see the personal aspects of doing this project. I garantee you will find something useful there and understand the plethora of knowledge you will acquire by finishing this project.
This is a (almost) free guide that will teach you how to deploy a fully operational WordPress website on AWS cloud infrastructure. I say almost free because we still have to pay for a domain in Route 53 to make the connection via "traditional" ways through a domain name, secured by an SSL certificate.
This is an excelent project to hone your AWS and cloud skills, since all cloud counterparts (GCP, Azure, etc) use similar structure compared to this. You will learn how to use VPCs, subnets, security groups, NAT gateways, route tables, VMs, file systems, databases, create domain names, SSL certificates and IAM roles, making it a great add to your portfolio.
Amazon VPC; EC2; IAM; EFS; RDS; Route 53; Certificate Manager; Systems Manager.
A minimum of cloud computing, networking and Linux commands knowledge is necessary to understand and deploy the resources provided in this guide. Some knowledge in the aforementioned AWS resources will be nice to have, but I will try to explain it on their respective sections.
- Building a Three-Tiered AWS VPC: Use Amazon VPC to create a custom VPC with six subnets, 2 for each public and private tiers for High Availability (HA) and fault tolerance. Route tables will also be created to direct traffic to the Internet Gateway (IG) for public internet access.
- Creating NAT Gateways: Use Amazon VPC to create NAT gateways and private route tables so our private subnets can also have access to the public internet.
- Creating the Security Groups: Use Amazon VPC to create Security Groups (SG) that controls inbound and outbound traffic for your resources.
- Creating the RDS Instances: Use Amazon RDS to create a database in the private subnets so we can gather login and configuration data from the WordPress website.
- Creating the Elastic File System (EFS): Use Amazon EFS to allow the webserver and the private app subnets to pull the application code and configuration files from the same location.
- Creating a Key Pair: Use Amazon EC2 to create a key pair that will SSH into the EC2 instances, allowing connections outside the AWS console.
- Launching the Setup Server: Use Amazon EC2 to create a temporary instance in the public subnet that will install WordPress and store the files in EFS and connect to the RDS database.
- SSH Into an EC2 Instance in the Public Subnet: Make your first connection in your computer through SSH to the EC2 instance.
- Installing WordPress: Using SSH, install Wordpress, store the files on EFS and data on RDS.
- Creating an Application Load Balancer and the Private Instances: Use Amazon EC2 to create an application load balancer that will distribute the connections between the EC2 instances in the two private app subnets.
- Registering a New Domain Name in Route 53: Use Amazon Route 53 to register a new domain name for your website.
- Creating a Record Set in Route 53: Use Amazon Route 53 to create a record set with an alias so we can access our website using our domain name.
- Registering for an SSL Certificate in AWS Certificate Manager: Use AWS Certificate Manager to register for a SSL certificate and use the SSL certificate to encrypt all communications between the web browser and webservers.
- Connecting to AWS Using Session Manager: Use AWS Systems Manager Session Manager and AWS IAM to create a role that will make the connection to the private EC2 instances, removing the need to SSH using key pairs.
- Creating a HTTPS Listener for the Application Load Balancer: Use Amazon EC2 to create a HTTPS listener so we can make secure connections to the website.
- Creating an Auto Scaling Group: Use Amazon EC2 to create an auto scaling group that automatically scale the amount of EC2 instances based on predefined policies and conditions.