Task 3-We have to create a web portal for our company with all the security as much as possible.

Aditya Jain
3 min readJul 14, 2020

So, we use Wordpress software with dedicated database server.

Database should not be accessible from the outside world for security purposes.

We only need to public the WordPress to clients.

So here are the steps for proper understanding!

Steps:

1) Write a Infrastructure as code using terraform, which automatically create a VPC.

2) In that VPC we have to create 2 subnets:

a) public subnet [ Accessible for Public World! ]

b) private subnet [ Restricted for Public World! ]

3) Create a public facing internet gateway for connect our VPC/Network to the internet world and attach this gateway to our VPC.

4) Create a routing table for Internet gateway so that instance can connect to outside world, update and associate it with public subnet.

5) Launch an ec2 instance which has Wordpress setup already having the security group allowing port 80 so that our client can connect to our wordpress site.

Also attach the key to instance for further login into it.

6) Launch an ec2 instance which has MYSQL setup already with security group allowing port 3306 in private subnet so that our wordpress vm can connect with the same.

Also attach the key with the same.

Note: Wordpress instance has to be part of public subnet so that our client can connect our site.

mysql instance has to be part of private subnet so that outside world can’t connect to it.

Don’t forgot to add auto ip assign and auto dns name assignment option to be enabled.

Try each step first manually and write Terraform code for the same.

This will give u proper understanding of workflow of task.

And the task is complete.

WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. It caters to business online development initiative with content management system facilities. WordPress allows the users to build a highly customizable website of their preference, and this manner makes it popular.

Usually, if the Wordpress Web portal is to be deployed for Company’s Official perspectives, it needs Cloud services for large scale contents. Generally AWS is the most preferred Cloud Service Platform. So for deploying deploying Content Management Platforms on AWS cloud, there are certain targeted labs, some open to public and some private for the UI and Database managements respectively. Thus, VPCs and Subnets come into picture.

Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you define. Here, we need to configure a VPC and two subnets, one exposed to public for deploying Wordpress workload server and the other kept private for deploying Database server(MariaDB in my case). We need to create our own customized AMIs for Wordpress and MariaDB server. Let me start by logging to my AWS console. Follow the steps once you have logged in

I have performed the terraform for it’s proper understanding of the workflow how it works actually….

The link to the github code is given below:

Thank you all for visiting……

--

--