© Stephane MaarekNOT FOR DISTRIBUTION © Stephane MaarekBenefits of AWS CloudFormation (1/2)•Infrastructure as code•No resources are manually created, which is excellent for control•The code can be version controlled for example using git•Changes to the infrastructure are reviewed through code•Cost•Each resources within the stack is tagged with an identifier so you can easily see howmuch a stack costs you•You can estimate the costs of your resources using the CloudFormation template•Savings strategy: In Dev, you could automation deletion of templates at 5 PM andrecreated at 8 AM, safely
© Stephane MaarekNOT FOR DISTRIBUTION © Stephane MaarekBenefits of AWS CloudFormation (2/2)•Productivity•Ability to destroy and re-create an infrastructure on the cloud on the fly•Automated generation of Diagram for your templates!•Declarative programming (no need to figure out ordering and orchestration)•Separation of concern: create many stacks for many apps, and many layers. Ex:•VPC stacks•Network stacks•App stacks•Don’t re-invent the wheel•Leverage existing templates on the web!•Leverage the documentation
© Stephane MaarekNOT FOR DISTRIBUTION © Stephane MaarekHow CloudFormation Works•Templates have to be uploaded in S3 and then referenced inCloudFormation•To update a template, we can’t edit previous ones. We have to re-upload a new version of the template to AWS•Stacks are identified by a name•Deleting a stack deletes every single artifact that was created byCloudFormation.
© Stephane MaarekNOT FOR DISTRIBUTION © Stephane MaarekDeploying CloudFormation templates•Manual way:•Editing templates in the CloudFormation Designer•Using the console to input parameters, etc•Automated way:•Editing templates in a YAML file•Using the AWS CLI (Command Line Interface) to deploy the templates•Recommended way when you fully want to automate your flow
© Stephane MaarekNOT FOR DISTRIBUTION © Stephane MaarekCloudFormation Building BlocksTemplates components (one course section for each):1.Resources: your AWS resources declared in the template (MANDATORY)2.Parameters: the dynamic inputs for your template3.Mappings: the static variables for your template4.Outputs: References to what has been created5.Conditionals: List of conditions to perform resource creation6.MetadataTemplates helpers:1.References2.Functions
© Stephane MaarekNOT FOR DISTRIBUTION © Stephane MaarekNote:This is an introduction to CloudFormation•It can take over 3 hours to properly learn and master CloudFormation•This section is meant so you get a good idea of how it works•We’ll be slightly less hands-on than in other sections•We’ll learn everything we need to answer questions for the exam•The exam does not require you to actually write CloudFormation•The exam expects you to understand how to read CloudFormation
Upload your study docs or become a
Course Hero member to access this document
Upload your study docs or become a
Course Hero member to access this document
End of preview. Want to read all 819 pages?
Upload your study docs or become a
Course Hero member to access this document
Term
Spring
Professor
NoProfessor
Tags