Objectives: -

Objectives: -

Perform the task-1 using EFS instead of EBS service on the AWS as,

Create/launch Application using Terraform

1. Create Key pair and Security group which allow the port 80.

2. Launch EC2 instance.

3. In this Ec2 instance use the existing key or provided key and security group which we have created in step 1.

4. Launch one Volume using the EFS service and attach it in your vpc, then mount that volume into /var/www/html.

5. Developer have uploded the code into github repo also the repo has some images.

6. Copy the github repo code into /var/www/html.

7. Create S3 bucket, and copy/deploy the images from github repo into the s3 bucket and change the permission to public readable.

8 Create a Cloudfront using s3 bucket(which contains images) and use the Cloudfront URL to update in code in /var/www/html.

what is EFS?

An elastic file system is a service that uses NFS protocol behind the scene. Here your data will be persistent and won't be loose.EFS provide us centralized storage known as EFS.NFS is a protocol name . It gives you file system and create NFS server.NFS share files and objects over the network. Here you can easily edit the file. EFS service only work per region.EFS directly mount to EC2 instance but for mounting to local laptop we have to setup one more extra service i.e VPN / direct connect to mount.

Lets see how it works :-

No alt text provided for this image

code for vpc: -

No alt text provided for this image

code for subnet: -

No alt text provided for this image

code for internet gateway and route table: -

No alt text provided for this image

code for security group: -

No alt text provided for this image

code for efs: -

No alt text provided for this image

code for S3: -

No alt text provided for this image

code for codepipeline :-

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

code for cloudfront: -

No alt text provided for this image

Outputs :-

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


To view or add a comment, sign in

More articles by Srishti Jain

  • Configuring Load Balancer on AWS using Ansible

    Task Description: 🔅Provision EC2 instances through ansible. 🔅 Retrieve the IP Address of instances using the dynamic…

    2 Comments
  • Deploying Webserver on AWS using Ansible

    This task involves the following steps: 1. Launching an EC2 instance.

    2 Comments
  • Deploying WordPress application on Kubernetes with AWS RDS using terraform

    The Objective of the task was to 1. Write an Infrastructure as code using terraform, which automatically deploy…

    13 Comments
  • Task 1 - Ansible

    STEPS TO DO THIS TASK : 🔹 Configure Docker 🔹 Start and enable Docker services 🔹 Pull the httpd server image from the…

    2 Comments
  • Creating a VPC using NAT Gateway and Integrating it with EC2

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

    2 Comments
  • Creating VPC and integrating it with Ec2

    STEPS: 1) Write a Infrastructure as code using terraform, which automatically create a VPC. 2) In that VPC we have to…

    5 Comments
  • EKS TASK

    What is EKS? Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run…

    11 Comments
  • Multi Node Kubernetes Cluster

    Here we are creating multi node kubernetes cluster by using one master and two slaves. Step1:- Install rhel 8 in your…

    9 Comments
  • Task 1: -

    1. Create the key and security group which allow the port 80.

    12 Comments

Insights from the community

Others also viewed

Explore topics