hands-on lab

Initializing Amazon EC2 Instances with AWS CloudFormation Init

Difficulty: Intermediate
Duration: Up to 45 minutes
Students: 172
Rating: 5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

With AWS CloudFormation, developers can spend less time managing resources and more time developing their applications. The reusable nature of CloudFormation templates allows developers to configure resources that can be deployed to different AWS regions or accounts.

AWS CloudFormation helper scripts can be called to initialize services on Amazon EC2 instances that are created as part of a stack.

In this lab, you will inspect and deploy an AWS CloudFormation template that utilizes the cfn-init and cfn-signal helper scripts to initialize an Apache server on an Amazon EC2 instance.

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Configure an Apache server on an Amazon EC2 instance using cfn-init
  • Signal to AWS CloudFormation when the instance configuration process has been completed using cfn-signal

Intended Audience

  • Candidates for the AWS Certified DevOps Engineer - Professional exam
  • Candidates for the AWS Certified Solutions Architect - Professional exam
  • Cloud Architects
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS CloudFormation
  • Amazon EC2

The following content can be used to fulfill the prerequisite:

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Comparing CloudFormation Init and EC2 User Data
Establishing Desired EC2 Instance State with AWS CloudFormation Init