AWS Cloud Project

AWS Cloud Project

About Task:

Launching application using Terraform-

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

2. Launch EC2 instance.

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

4. Launch one Volume (EBS) and mount that volume into /var/www/html

5. Developer have uploaded 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.

Prerequisite - 

⦁ Basic knowledge about AWS, such as EC2, AMI, Security Group, IAM user

⦁ An AWS account

Explanation of project:

Step-1 Cloud Provider

Firstly specify that we are using AWS service, filling region and profile name

No alt text provided for this image

Step-2 Creating the key-pair

No alt text provided for this image

Output of the following code:

No alt text provided for this image

Step-3 Creating security group

 A security group acts as a virtual firewall for your instance to control incoming and outgoing traffic.We can add rules to each security group that allow traffic to or from its associated instances. We can modify the rules for a security group at any time.

Creating security group which allows port no. 80 (for webserver) and also allowing the port no. 22( for SSH).

No alt text provided for this image

Output of the above code:

No alt text provided for this image

Step-4 Launching EC2-Instance

An EC2 instance is a virtual server in Amazon's Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure. AWS is a comprehensive, evolving cloud computing platform; EC2 is a service that allows business subscribers to run application programs in the computing environment.

Launching the EC2 instance from terraform using the key and security group.

No alt text provided for this image

Output of the above code:

No alt text provided for this image

Step-5 Launching the EBS volume 

An Amazon EBS volume is a durable, block-level storage device that you can attach to one instance or to multiple instances at the same time. You can use EBS volumes as primary storage for data that requires frequent updates, such as the system drive for an instance or storage for a database application.

Launching the EBS volume with instance with same Availability Zone as Instance have:

No alt text provided for this image

Output of the above code:

No alt text provided for this image

Step-6 Null Resources

The null_resource resource implements the standard resource lifecycle but takes no further action.

No alt text provided for this image

Step-7 Creating S3 Bucket

An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services' (AWS) Simple Storage Service (S3), an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects, which consist of data and its descriptive metadata.

Creating the S3 bucket and uploading image into S3 bucket from GitHub repo Dynamically. Name of image is Path.jpg which i uploaded on GitHub.

No alt text provided for this image

Output of the above code:

No alt text provided for this image

Step-8 Creating CloudFront

Amazon CloudFront is a content delivery network offered by Amazon Web Services. Content delivery networks provide a globally-distributed network of proxy servers which cache content, such as web videos or other bulky media, more locally to consumers, thus improving access speed for downloading the content.

Creating CloudFront which distribute my image from S3 bucket in all near edge location.

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

Output of the above code:

No alt text provided for this image

Step-9 CloudFront URL and the IP of the instance can be printed following code

No alt text provided for this image

Final Output:

No alt text provided for this image

I have uploaded every content related to my project on my GitHub URL

Thank you!!




To view or add a comment, sign in

More articles by Akanksha Bhatt

  • Task-8 Automation with Python

    ARTH - Task 8 👨🏻💻 Task Description📄 🔰 Create a Menu Using Python integrating all the concepts that have been…

  • Task-14.3

    𝗧𝗮𝘀𝗸 𝗗𝗲𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻 : Create an Ansible Playbook which will dynamically load the variable file named same…

  • Task-14.2

    Ansible playbook that will retrieve new Container IP and dynamically update the inventory and Configure web-server…

  • Task-14.1

    Task description :- 14.1 Create a network Topology Setup in such a way so that System A can ping to two Systems System…

  • LOAD BALANCING WITH HAPROXY

    Task Description 12.1 Use Ansible playbook to Configure Reverse Proxy i.

    1 Comment
  • ARTH TASK-15

    Task Description📄 Create an ansible role myapache to configure Httpd WebServer. Create another ansible role…

    1 Comment
  • Neural Networks in Netflix

    What are Neural Networks? Neural networks are a set of algorithms, they are designed to mimic the human brain, that is…

  • Restarting HTTPD Service is not idempotent in nature and also consume more resources suggest a way to rectify this challenge in Ansible Playbook.

    What is Idempotent nature in Ansible? An operation is idempotent if the result of performing it once is exactly the…

  • CONFIGURING HADOOP CLUSTER USING ANSIBLE

    Welcome you all, in this blog I will cover how we can“ CONFIGURE HADOOP CLUSTER USING ANSIBLE” Before starting the…

    1 Comment
  • How Industries are Solving Challenges Using Ansible??

    What Is Ansible ? 🤔 Ansible is a software tool that provides simple but powerful automation for cross-platform…

Others also viewed

Explore content categories