The Knowledge Gathered by Deploying a Wordpress website in AWS

This post is more of a personal guide for this project, showing the importance of knowledge acquired and my pain in the process of deploying the resources of this project. Check-out my project on GitHub for the detailed step-by-step process.

This is an old staple now, a step that every data guy has to make for their first interactions with the cloud, you certainly have heard of it. But why do you see so many YouTubers like Tech With Lucy recommending this project? Because, for learning cloud basics, it's just that good.

It arranges you with the basic knowledge of cloud computing, how to set an internet gateway that is going to connect your service with the public internet, how to split your resources to different availability zones to increase availability, how to make a presentable domain name so you don't access your website via an IP, how to make a fancy SSL certificate to make your website more secure, and much more.

But why AWS?

I'm a GCP fan, Bigquery is by far the best data warehousing tool in the cloud, but AWS is just so much more popular. They are the provider that has the largest share of the market compared to others. It makes up for half of Amazon’s operating income, which translates to billions of dollars.

Again, as a GCP fan, I was overwhelmed at how entry level AWS can be, not because it's easier but because there is so much more tutorials and step-by-step guides in AWS compared to GCP.

What You Will Learn

  1. Multi-tiered architecture: AWS favors microservices. You could deploy everything into an EC2 instance and leave it there, but what would happen if this instance went down for a moment? Or if you suddenly had a huge spike in access from the internet for your little EC2 instance to handle and your database is overwhelmed by data from new users? How would you manage the access to public internet, and load balancing just on EC2 instances? That is why we divide it into microservices, so each resource deployed has the right perks for the job, instead of one generalist and prone-to-fail monolithic architecture.
  2. VPC: You can't do much without a VCP in AWS. It creates the "houses" (subnets) and security that your resources will reside. Security tools like security groups and network ACLs (Access Control Lists) are very important to manage the permissions in traffic between resources and the public internet.
  3. Auto scaling groups: It also answer the question of the sudden spike in growth, your EC2 instance needs to grow when the demand grows and shrink when the demand shrinks. What if you just create a lot of EC2 instances and leave them ready for the spikes? Good luck on your bill next month, it's very inefficient to leave so much power ready for little action.
  4. Load balancing: So you have a system that deploys EC2 instances according to demand but what if the server of those instances go down? All the instances go down. This is why you load balance stuff, you put them on different Availability Zones (AZ), which are just different servers in different physical areas, so when one area goes down, the load balancers will feed everything to the other AZ. This is the principle of High Availability (HA). Load balancing also helps in distributing load between the AZs.
  5. Creating domain names: You have a nice architecture and website deployed for the public, give me the link so I can access this beautiful website! dualstack.Dev-ALB-414023506.us-east-1.elb.a... Nice. This is the endpoint of your load balancer, but I think a ".com" domain would be nicer, wouldn't it?
  6. Securing via SSL certificates: Now you have to increase the security of your website, so you can have encryption in transit for it. Besides, having an SSL certificate and serving your website over HTTPS can positively impact your website's score in Google search results.

The Pain

There were some sections that really took some time to grasp the concept or to troubleshoot through. The most painful for me was the section #9 (Installing WordPress). Some knowledge of Linux commands is required but the most difficult part for me was understanding why it almost worked in the first place but it didn't on further attempts. That is because when you install WordPress in your EC2 instance and when you change the configuration files in it, all of it is saved on EFS. This seems so clear now but not so much in the midst of a turmoil of problems. A little pause for admiring nature or the simple errands in your life may be the solutions to your problems, just give it some time.

The Price

It's not free. Be aware that deploying this relatively complex architecture will incur in minor costs.

First, you have to create a domain name (website name) using Route 53. You could create a ".com" Top-Leve Domain (TLD) and pay 13.00 USD on that but there is a cheaper ".click" domain that you pay only 3.00 USD. It's nice that, once payed, you have this domain for 1 year so you can recycle it by using in other projects. Second, be careful about the price of your elastic IPs. Try to finish the project as fast as possible because it will incur minor costs when you deploy it in your EC2 instances. For me, I had to not only deploy all the architecture but catalog all of in the project, so I had like 5 days of resource usage and that gave me almost 30 dollars in the final bill of the month. Try to commit to this in one day, you can do it.

Conclusion

Deploying WordPress in AWS is an enriching experience that provides valuable knowledge and skills for managing scalable, highly available, and secure web applications. Through this process, you'll gain insights into AWS infrastructure, scalability, high availability, security best practices, cost optimization techniques, and automation. Armed with this knowledge, you'll be well-equipped to build, deploy, and manage most of the AWS architectures that your Solutions Architect career will require.