Hola readers! Today I am going to show you how we can set up a basic AWS RDS setup and use it with the front end which in my case would be Wordpress. First let's see what is AWS RDS.
AWS RDS
Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.
Amazon RDS is available on several database instance types - optimized for memory, performance or I/O - and provides you with six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server. You can use the AWS Database Migration Service to easily migrate or replicate your existing databases to Amazon RDS.
Let's Start
For this demo our set up will be like this:
- An EC2 instance which will host our front end WordPress
- RDS for the backend database
First, let's set up our front end. For this launch an ec2 instance as per your requirements.
Now ssh into the instance and then we will configure WordPress inside. For configuring WordPress there are multiple ways but here I use container image to setup WordPress easily. To do this we have to install docker.
Now we have to pull the WordPress image from the docker hub.
Now all that's left is to run the container.
Our front end is now ready. Let's set up our back end now.
For this go to the RDS section and then to the database and create a new database.
Here fill out all the relevant info like database name, password, backup, scalability, etc according to your requirements and then create it and our database will be ready in a few minutes.
Now we just go to your instance's public IP and you will be able to see the WordPress site.
And then fill out the database information which you used while creating RDS like this. For database host, you have to provide your RDS endpoint URL which you can find by clicking the database name in RDS.
Now our setup is ready.
This way we can configure RDS and use it in a simple way. That's it for this one and see you next time ...!!