‫Welcome to this section
‫on Deploying and Managing Infrastructure at Scale.
‫In this section, we'll see different ways
‫to deploy your workloads onto AWS.
‫And the first technology I want to talk about
‫is CloudFormation.
‫So CloudFormation is such an important technology in AWS
‫because it is a declarative way of outlining
‫your AWS infrastructure, for any resources.
‫And most of them are supported.
‫So to give you a concrete example in CloudFormation,
‫you would say, I want a security group,
‫I want two EC2 instances
‫that will be using the security group,
‫I also want an S3 bucket,
‫and I want a load balancer in front of all these machines.
‫Then CloudFormation automatically creates all these things
‫for you, in the right order, with the exact configuration
‫that you specify.
‫So the benefits of using CloudFormation are multiple,
‫but the first one is that all your infrastructure
‫is as code.
‫That means that you will never, ever
‫create resources manually like we've done in this course,
‫which is excellent for control.
‫And that means that anytime you do a changes
‫to how your AWS cloud is doing,
‫then it needs to be reviewed through code review,
‫which is a great way to operate in a cloud.
‫On top of things, there is a cost advantage
‫because each resource within this stack
‫is going to get a tag that is going to be similar
‫to all the other resources creating within the stack.
‫And you can also easily estimate the cost of your resources
‫using the CloudFormation template.
‫And finally, thanks to CloudFormation,
‫you can have the saving strategy.
‫For example, you can say that in some environment
‫you could automate the deletion of all the templates
‫at 5 p.m, which will delete all the associated resources
‫with that template, and then recreate it at 9 a.m.
‫or 8 a.m., safely.
‫And so therefore, you have cost savings
‫because you don't have any resources
‫between 5 p.m. and 8 a.m.
‫We CloudFormation, it's super easy to create
‫and delete resources,
‫which is one of the biggest cloud principle.
‫Then for productivity.
‫So as I said, you are able to destroy
‫and recreate the infrastructure on the fly.
‫It's also generating diagrams for you,
‫for your templates, as we'll see very soon, quickly,
‫and there's declarative programming.
‫So you don't need to figure out
‫if you need to create a DynamoDB table,
‫first on EC2 instance or all these things together.
‫The CloudFormation template is smart enough
‫to figure out how to do things.
‫Finally, with CloudFormation, we don't re-invent the wheel.
‫So that means that we can leverage existing templates
‫on the web.
‫We can leverage documentation
‫and that CloudFormation supports
‫almost all AWS resources.
‫That means that everything we'll see in this course
‫is supportive of CloudFormation.
‫And in case it isn't, you can use something called
‫a custom resource, for resources that are not supported.
‫So CloudFormation really is the base of infrastructure
‫as code on AWS.
‫So as I said, you could see the CloudFormation visually
‫to see a diagram of what is created.
‫So I took an online WordPress CloudFormation Stack,
‫and then I went into the designer
‫to see what it was giving me, and it gave me this diagram.
‫So as we can see here,
‫we can see the different components that are created.
‫For example, we have security groups,
‫we have an ALB listener, we have a launch configuration,
‫a load balancer, a database instance for RDS
‫and an auto-scaling group.
‫And confirmation is smart enough to create this diagram,
‫but also creates all the relationships
‫between all these components, which is very handy.
‫As we can see, we can see all the resources
‫and their relations.
‫So from an exam perspective,
‫CloudFormation is going to be used
‫when we have infrastructure as code,
‫when we need to repeat an architecture
‫in different environments, different regions,
‫or even different AWS accounts.
‫So that's it for me.
‫I will see you in the next lecture
‫for a short practice on CloudFormation.