Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a CloudFormation YAML template with the name, amazon-linux-nginx.yaml, that will create an Amazon Linux server in the current AWS region, running the nginx web

Create a CloudFormation YAML template with the name, amazon-linux-nginx.yaml, that will create an Amazon Linux server in the current AWS region, running the nginx web server using the CloudFormation helper scripts including cfn-init, cfn-signal and ensuring that the cfn-hupdaemon is running and will handle updates.

The nginx server must be running on your server. Hint: While developing this template, you probably want to spin up an Amazon Linux instance and do the install of nginx manually first to see what it takes.

Note: The configuration of nginx on Amazon Linux is more complicated than on Ubuntu. Notably, you must either edit the default .conf file, in which you might want to look into something like the following:

perl -077pi -e 's@needle@FOUND@s' haystack 

This command would seach the file named haystack for the first occurence of the string needleand replace that with FOUND -- modifying the haystack file. For testing, leave off the i from -pi.

Alternatively, you could use the files: rule to create the appropriate .conf file.

For reference you may want to check out https://gist.github.com/dragonjet/270cf0139df45d1b7690#file-2b-nginx-md (Links to an external site.)Links to an external site.. Note: however, you will want to remove/ignore the php stuff there.

You must configure nginx to use /var/www/html as the location for the website.

You must have mappings for AMIs in all of the AWS regions.

Your must have template must have parameters for the following:

the key pair to use for connecting to the instance via ssh

the allowed CIDR block that ssh is allowed on, with a default of USF's CIDR block.

Your security group must allow ssh connections only from the specified CIDR block, and web connections from anywhere.

Your template must create a default index.html page in the appropriate location that displays the following info:

Your name in an h1 header and the title of the page

The server's public DNS name and AWS region. For public DNS name, the naive implementation will lead to circular dependencies.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago

Question

Question What is a secular trust?

Answered: 1 week ago