AWS NAT

Task Description






 

Performing the following steps:

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

 

 

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

    1.   public  subnet [ Accessible for Public World! ] 

    2.   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 sothat 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 to have a proper understanding of workflow of task.

 




Creation of IAM user - 

    We create a IAM user in AWS. This user can access AWS but it has less powers than admin or root. 















Creating VPC - 

    We create a VPC in AWS...we will attach subnet public and private service with this VPC.






Applying Terraform -

we apply terraform to validate our VPC creation terraform code.

















Subnet creation public and private

We create public and private subnet inside our VPC.







Subnet code validate by terraform

Now we apply terraform to validate our code to creation of Subnet in VPC.








Internal gateway

Here we create an internal gateway, so that our instances can access web.








Terraform Apply

We apply terraform to validate our code.











Route table apply

After this we create our route table(apply route table).













Iam User authentication by git  bash

Now we authanticate the IAM user we created previously.











Creating a Security group to allow http and mysql - 

We create a new security group for our instance so that it'll allow http connection and mySQL service.








LAUNCH INSTANCE WITH WORDPRESS AND SQL

Now we launch the instance with mySQl and Wordpress.





















Project Team:

                    1. Tushar sharma

                     2. Vishal kumar







Comments