Question: Hello, I'm severely stuck on this cloudformation assignment and have no idea how to go about it. I have been searching for hours on the

Hello,

I'm severely stuck on this cloudformation assignment and have no idea how to go about it. I have been searching for hours on the internet about how to go about editing this yaml file and all the answers I get are either having to do with MariaDB, Ansible, or installing things via the User Data section. As the professor said, we are not to change ANYTHING in this section. The objective is to

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

He says the solution must not in any way leak credentials such as the password, so hardcoding the password into the yaml template is out of the question. I'd love if anyone can just give me direction, or help me understand what to do. It's been just frustrating to not know what to do whatsoever.

Thanks in advance for any help, pointers, etc.

CODE TEMPLATE PROVIDED:

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: |

Dr. V's CloudFormed Server

with CloudFormation Helper Scripts

Hi!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!