API code is available on https://github.com/Nagendra-babu-Shakamuri/webapp
aws.mp4
Infrastructure as Code: This assignment will focus on setting up networking resources such as Virtual Private Cloud (VPC), Internet Gateway, Route Table, and Routes. We use Terraform for infrastructure setup and tear down.
Terraform is an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure
The terraform init command initializes a working directory containing Terraform configuration files:
terraform init
The terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure:
terraform plan
The terraform apply command executes the actions proposed in a Terraform plan to create, update, or destroy infrastructure:
terraform apply
The terraform destroy command is a convenient way to destroy all remote objects managed by a particular Terraform configuration:
terraform destroy
Updated the terraform script to create an EC2 instance from the custom AMI image.
Updated the terraform script to create a DNS A record and point the subdomain to the EC2 Ip address.
Updated the terraform script to add cloudwatchagent server policy to the EC2-CSYE6225 role.
Updated the terraform script to add load balancer, EC2 target group and Auto scaling group to balance the load between/among the instances.
Attached the imported SSL certificate to the listener interface of the load balancer and allowed only HTTPS traffic. Updated the terraform script and removed HTTP port from the listener interface of the ALB to prevent HTTP traffic flowing into the Loadbalancer. Updated the launch template to encrypt the EBS volume of the EC2 instance with a KMS key. Also used another KMS key to encrypt RDS.
Following is the command used to import the NameCheap SSL certificate into the AWS certificate manager.
aws acm import-certificate --certificate file://Certificate.pem --certificate-chain file://CertificateChain.pem --private-key file://PrivateKey.pem
Developer - Nagendra babu Shakamuri
NUID - 002771584
Email - [email protected]