Live! AWS CloudFormation Step by Step: Intermediate to Advanced

AWS CloudFormation Step by Step: Intermediate to Advanced

Today, I am excited to announce my third course on Udemy, the long waited advanced-level AWS CloudFormation course, AWS CloudFormation Step by Step: Intermediate to Advanced!

This course continues from my first course, AWS CloudFormation Step by Step: Beginner to Intermediate, and teaches you more advanced features of AWS CloudFormation. If you already finished my beginner-level AWS CloudFormation course, you know that I announced the advanced course there from day 1. Now, it is finally here!

In this post, let’s talk about what you will learn in the Intermediate to Advanced course section by section. Besides, as in my previous courses, I will also share a discount coupon special to launch in the end.

What will you learn in this course?

AWS CloudFormation allows you to define your infrastructure as code and automate the provisioning of your AWS resources. It is the foundational service of achieving operational excellence on AWS. Today, most of the automation services on AWS, such as Elastic Beanstalk, Mobile Hub, even CDK, still use this service behind the scenes to deploy your AWS services.

Before launching my first AWS CloudFormation course, I organized the topics into two separate courses to align the course contents according to student levels. Therefore, in my first course, AWS CloudFormation Step by Step: Beginner to Intermediate, you start learning AWS CloudFormation as a beginner and achieve an intermediate level on it, where you use CloudFormation for your daily provisioning needs on AWS.

My new Intermediate to Advanced course will take you from the place you finished Beginner to Intermediate and teach you advanced topics of AWS CloudFormation. Hence, completing the beginner-level course or knowing all its topics is a prerequisite for my new course.

Hence, these are the main topics you will learn in AWS CloudFormation Step by Step: Intermediate to Advanced briefly:

  • Organizing multiple stacks efficiently with cross-stack references and nested stacks

  • Configuring your EC2 instances with EC2 UserData, CreationPolicy, and CloudFormation helper scripts ( cfn-init, cfn-hup, cfn-signal )

  • Managing how CloudFormation updates resources that support policy attributes

  • Preventing updates of your stack resources by defining stack policies

  • Bringing your own logic to CloudFormation with custom resources and controlling the flow of stack creations with wait conditions

  • Detecting and resolving stack drifts, importing unmanaged resources

  • Defining and deploying serverless resources efficiently with AWS Serverless Application Model (SAM) and SAM CLI

How is this course organized?

In each section, I cover one or more main topics with some auxiliary or intermediate sub-topics along the way. Besides, we proceed step by step as in my previous courses. So, it is crucial to follow the sections in order as I sometimes mention them in the subsequent lectures.

Section 1: Cross-stack References & Nested Stacks

In the first section, we will start with cross-stack references. You will learn how to export an output from a stack and import it in another. We will also talk about what happens when you try to update or delete a referenced stack.

Section 1 - cross-stack references

Next, we will continue with nested stacks, and you will learn how to create child stacks from a root stack using AWS Management Console first. We will proceed with nested stack updates and deletions afterward, and you will understand how nested stacks work. After these, we will start using AWS CLI and bash scripts to make the deployments of nested stacks more straightforward.

Section 1 - Creating nested stacks from a root stack

During this section, you will also learn to protect your ordinary and nested stacks from deletion by enabling termination protection on them. There will be examples of intrinsic Fn::Join, Fn::Split and Fn::GetAZs functions, too.

Section 2: EC2 UserData & CloudFormation Helper Scripts

In section 2, we will start with installing Nginx on an EC2 instance with CloudFormation by providing a bash script in the UserData property.

Next, we will cover how to create IAM resources with CloudFormation and talk about the CAPABILITY_IAM and CAPABILITY_NAMED_IAM capabilities with an example.

Then, we will make an introduction to resource policy attributes with the CreationPolicy and helper scripts with cfn-signal and use them together to make a stack creation wait until CloudFormation receives a success signal from the physical EC2 instance. The instance will send the signal only after its configuration finishes.

Section 2 topics in general

After that, you will learn to configure your instances more efficiently with the cfn-init helper script and AWS::CloudFormation::Init metadata. We will make an example of source downloads and providing S3 access to cfn-init with AWS::CloudFormation::Authentication metadata as well.

Next, we will proceed with another helper script, cfn-hup, and you will learn to use it to update your EC2 instance configurations. We will talk about viewing helper script logs on an EC2 instance and using cfn-get-metadata.

And finally, we will conclude the section with a lecture on using CloudFormation helper scripts with EC2 auto scaling groups and launch templates.

Section 3: Resource Policy Attributes

Section 3 is a dedicated section to the resource policy attributes other than the CreationPolicy attribute covered in the second section. We will make examples of performing rolling and replacing updates on EC2 auto scaling groups with the UpdatePolicy attribute.

Section 3 topics in general

Besides, you will learn to define DeletionPolicy and UpdateReplacePolicy attributes on the resources supporting them to control which actions AWS CloudFormation will take on resource deletions or replacements, respectively.

Section 4: Stack Policies

In Section 4, you will learn to prevent updates of your stack resources during a stack update with the help of a stack policy. You will learn how to set or update them. We will cover different use cases in detail, such as preventing updates of a specific resource or only a specific type of update. We will also make an example of defining conditions in a stack policy to avoid updates of resources from particular resource types.

Section 4 topics in general

Section 5: Custom Resources & Wait Conditions

In the fifth section, we will cover advanced CloudFormation concepts, custom resources, and wait conditions.

Firstly, we will talk about what custom resources are and how they work. Then, I will provide an AWS Lambda function as the custom resource provider to create, update or delete an EC2 key pair and make demos with it. You will understand how to handle your custom resource operations in your own Lambda functions

Then, we will proceed with wait conditions and discuss their use cases. We will make an example of using wait conditions with the CreationPolicy attribute and cfn-signal helper script. You will also learn how to define wait condition handles and signal their wait conditions using them.

Section 5 and Section 6 topics in general

Section 6: Detecting Drifts & Importing Resources

Section 6 will cover two closely related CloudFormation concepts together, drift detection and resource import feature. We will start with a simple drift and resolve it together by updating the stack template.

In addition, you will learn to use CloudFormation’s resource import feature to resolve stack drifts by removing resources from the stack and importing them back. We will make examples of two use cases.

After these, you will learn how to create a stack from your existing AWS resources not managed by any stack yet.

Section 7: Serverless with AWS Serverless Application Model (SAM)

If you follow this blog, you may have encountered my posts with AWS Serverless Application Model (SAM), a subset of AWS CloudFormation to define and deploy serverless resources. So, Section 7 will cover SAM with a CloudFormation perspective.

As this is not an AWS Lambda course, we will not do any programming on our Lambda functions. But you will learn how to initialize a SAM project and deploy it using SAM CLI.

But we will not stop there, and you will learn to customize your SAM projects by adding new functions and other types of serverless resources. You will learn to use SAM’s resource types reference for this.

Section 7 topics in general

Besides, you will learn to define IAM permissions for your Lambda functions easily with SAM policy templates. We will also cover using stack parameters with SAM and deleting SAM stacks.

So, this section will cover the most common features of SAM for your serverless projects.


  • As the first prerequisite, I assume that you either finished or know all topics of my beginner-level course, AWS CloudFormation Step by Step: Beginner to Intermediate, which this course takes as a basis.

  • You should be an intermediate-level AWS user around core services for hands-on examples.

  • You should have basic YAML knowledge for the templates.

  • You should be comfortable with using the command-line and know the cloudformation commands of AWS CLI as covered in my beginner-level CloudFormation course.

  • Therefore, this course is not for beginners to AWS CloudFormation. If you are a beginner, please join and finish my AWS CloudFormation Step by Step: Beginner to Intermediate course first. I will be happy to see you in this course after that.


With my CloudFormation courses, I aimed to help you to start learning CloudFormation as a beginner and become an advanced user in the end. My new course, AWS CloudFormation Step by Step: Intermediate to Advanced, will continue your CloudFormation journey with new, more advanced topics.

For me, course production takes months of work, from planning the initial course structure to shooting and editing the last lecture. So now is the time to share it with you. I hope you find it useful and learn things that can help you in real life.

See you in AWS CloudFormation Step by Step: Intermediate to Advanced!

Launch Coupon for Readers

Thanks for taking the time to read this post!

For the next four days, you can join my CloudFormation courses with their lowest possible prices on Udemy, using the links below.

Alternatively, you can use the CF2-LAUNCH coupon for both courses during the checkout.

The coupon will last only a few days. So, don’t miss the chance if you are interested.

By the way, in addition to my AWS CloudFormation courses, I also have an AWS CodePipeline course, AWS CodePipeline Step by Step, which you may also want to join.

Hope to see you in my courses!

AWS CloudFormation Step by Step: Intermediate to Advanced
Emre Yilmaz

AWS Consultant • Instructor • Founder @ Shikisoft