Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will modify this template to secure MySQL. (I have added the template at to the very bottom of this question) You will note that

You will modify this template to secure MySQL. (I have added the template at to the very bottom of this question)

You will note that much has already been setup including various sections such as files, services, commands, etc. You must use the appropriate sections, rather than putting your code in User Data -- that must remain unedited.

As noted in lecture, it still allows someone to login to MySQL without a username and password. There are other issues that are non-secure about the default MySQL installation. The mysql_secure_installation command does all that is needed to properly secure MySQL. However, it does not lend itself to being easily called from a script. Your job is to research how to make this template do all the same things that mysql_secure_installation does. Basically there are a couple of ways of doing this:

  1. Somehow call mysql_secure_installation from the template
  2. OR just perform the same actions that the mysql_secure_installation does

Whatever solution you implement it must not in any way leak credentials such as the password. So, for instance, hardcoding the password in the template, or if the result of your solution exposes the password in history or log files.

aws TEMPLATE:

--- Description: Setup an Amazon Linux Web server

Parameters: DBRootPassword: Type: String Description: Root password for MySQL NoEcho: 'true' MinLength: 7 MaxLength: 41 AllowedPattern: '[a-zA-Z0-9]+' KeyName: Type: AWS::EC2::KeyPair::KeyName Description: Name of an existing EC2 keypair to enable SSH access to the instance SSHCIDR: Type: String Description: The CIDR block restricting SSH MinLength: 9 Default: 131.247.0.0/16 AllowedPattern: '(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})' ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x

Mappings: Region2AMI: us-east-2: AMI: ami-0cd3dfa4e37921605 us-west-1: AMI: ami-0ec6517f6edbf8044

Resources: EC2Instance: Type: AWS::EC2::Instance Metadata: AWS::CloudFormation::Init: configSets: InstallAndConfig: - Install - Configure Install: packages: yum: httpd: [] mysql-server: []

files: /var/www/html/index.html: content: |

Annas CloudFormed Server

with CloudFormation Helper Scripts

Hi!!

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

=+What is the nature of the unions in the particular country?

Answered: 1 week ago