{"id":2124,"date":"2019-08-22T07:23:35","date_gmt":"2019-08-22T07:23:35","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=2124"},"modified":"2020-05-02T07:35:14","modified_gmt":"2020-05-02T07:35:14","slug":"cloudformation-concepts","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/","title":{"rendered":"CloudFormation Concepts"},"content":{"rendered":"\n<ul class=\"wp-block-list\"><li>It is a AWS service <\/li><li>Used to model and set up AWS resources <\/li><li>create a template to describes AWS resources\nneeded <\/li><li>responsible for provisioning and configuring AWS\nresources <\/li><li>It simplifies Infrastructure Management<\/li><li>Cloud formation template describes all needed resources\nand their properties. <\/li><li>It provisions <ul><li>Auto\nScaling group<\/li><\/ul><ul><li>load\nbalancer<\/li><\/ul><ul><li>and\ndatabase <\/li><\/ul><\/li><li>Can easily edit or delete resources &nbsp;<\/li><li>manage a collection of resources as a single\nunit or stack.<\/li><li>Quickly replicate infrastructure<\/li><li>control and track changes to your infrastructure<\/li><\/ul>\n\n\n\n<p><strong>CloudFormation Working<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Easily create an infrastructure stack, with\nCloudFormation by<ul><li>making\nunderlying service calls to AWS <\/li><\/ul><ul><li>provision\nand configure AWS resources. <\/li><\/ul><\/li><li>calls are as per defined template. <\/li><li>CloudFormation perform only actions having\npermission to do. <\/li><li>CloudFormation template can be a JSON or\nYAML-formatted document<\/li><li>After all resources have been created, AWS\nCloudFormation reports stack creation<\/li><li>If stack creation fails, CloudFormation rolls\nback changes by deleting the resources that it created.<\/li><\/ul>\n\n\n\n<p><strong>Steps<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Design an CloudFormation template in AWS CloudFormation Designer or text editor. <\/li><li>Save the template locally or in an S3 bucket. <\/li><li>Create an AWS CloudFormation stack by specifying the location of your template file.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"245\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image017-1.png\" alt=\"\" class=\"wp-image-2125\"\/><\/figure>\n\n\n\n<p><strong>Change Sets<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It is a summary of proposed changes to stack<\/li><li>Used to update stack for changes to running\nresources in stack<\/li><li>Before making changes, generate a change set<\/li><li>Change sets enables seeing impact&nbsp; of change on running resources, before\nimplementing them.<\/li><li>Updates can cause interruptions, depending on resource\nand properties being updated<\/li><li>Change sets don&#8217;t indicate whether stack update\nwill be successful.<\/li><li>Example, changing Amazon RDS database instance\nname, <ul><li>CloudFormation\nwill create a new database and delete the old one and and will lose data in old\ndatabase <\/li><\/ul><ul><li>With\nchange set, see changes on database to be replaced, and plan accordingly<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>Updating a Stack with Change Sets<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>To update stack&#8217;s resources, modify stack&#8217;s template. <\/li><li>Do not create new stack and delete old one. <\/li><li>Instead, create change set by submitting a modified version of original stack template, <\/li><li>CloudFormation compares the modified with original template and generates a change set. <\/li><li>Change set lists the proposed changes. <\/li><li>After reviewing changes, execute the change set to update stack <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"749\" height=\"190\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image018-1.png\" alt=\"\" class=\"wp-image-2126\"\/><\/figure>\n\n\n\n<p>Steps<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Modify CloudFormation stack template using\nCloudFormation Designer or a text editor. <\/li><li>Save the AWS CloudFormation template locally or\nin an S3 bucket.<\/li><li>Create change set by specifying stack to update\nand location of the modified template<\/li><li>View change set to check CloudFormation will\nperform with the changes <\/li><li>Execute change set to apply to stack.<\/li><\/ul>\n\n\n\n<p>Limits<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Limit<\/strong><\/td><td><strong>Description<\/strong>    <\/td><td><strong>Value<\/strong>    <\/td><td><strong>Tuning Strategy<\/strong><\/td><\/tr><\/thead><tbody><tr><td>cfn-signal wait condition data   <\/td><td>Maximum amount of data that cfn-signal can pass.   <\/td><td>4,096 bytes<\/td><td>To pass a larger amount, send the data to an Amazon S3 bucket, and then use cfn-signal to pass the Amazon S3 URL to that bucket.<\/td><\/tr><tr><td>Custom resource response   <\/td><td>Maximum amount of data that a custom resource provider can pass.   <\/td><td>4,096 bytes   <\/td><td><\/td><\/tr><tr><td>Mappings   <\/td><td>Maximum number of mappings that you can declare in your AWS CloudFormation   template.    <\/td><td>100 mappings   <\/td><td>To specify more mappings, separate your template into multiple templates   by using, for example, nested stacks.    <\/td><\/tr><tr><td>Mapping attributes   <\/td><td>Maximum number of mapping attributes for each mapping that   you can declare in your AWS CloudFormation template.    <\/td><td>64 attributes   <\/td><td>To specify more mapping attributes, separate the attributes into multiple mappings.    <\/td><\/tr><tr><td>Mapping name and mapping attribute name   <\/td><td>Maximum size of each mapping name.   <\/td><td>255 characters   <\/td><td><\/td><\/tr><tr><td>Outputs   <\/td><td>Maximum number of outputs that you can declare in your AWS CloudFormation template.    <\/td><td>60 outputs   <\/td><td><\/td><\/tr><tr><td>Output name   <\/td><td>Maximum size of an output name.   <\/td><td>255 characters   <\/td><td><\/td><\/tr><tr><td>Parameters   <\/td><td>Maximum number of parameters that you can declare in your AWS   CloudFormation template.    <\/td><td>60 parameters   <\/td><td>To specify more parameters, you can use mappings or lists in order to assign multiple values to a single parameter.    <\/td><\/tr><tr><td>Parameter name   <\/td><td>Maximum size of a parameter name.   <\/td><td>255 characters   <\/td><td><\/td><\/tr><tr><td>Parameter value   <\/td><td>Maximum size of a parameter value.   <\/td><td>4,096 bytes   <\/td><td>To use a larger parameter value, create multiple parameters and then use t<code>o append the multiple values into<\/code> a single value.    <\/td><\/tr><tr><td>Resources   <\/td><td>Maximum number of resources that you can declare in your AWS   CloudFormation template.    <\/td><td>200 resources   <\/td><td>To specify more resources, separate your template into multiple templates by using, for example, nested stacks.    <\/td><\/tr><tr><td>Resources in concurrent stack operations    <\/td><td>Maximum number of resources you can have involved in stack operations   (create, update, or delete operations) in your region at a given time.    <\/td><td>Use the DescribeAccountLimits API to determine the current limit for an account in a specific region.    <\/td><td><\/td><\/tr><tr><td>Resource name   <\/td><td>Maximum size of a resource name.   <\/td><td>255 characters   <\/td><td><\/td><\/tr><tr><td>Stacks   <\/td><td>Maximum number of AWS CloudFormation stacks that you can create.   <\/td><td>200 stacks   <\/td><td>To create more stacks, delete stacks that you don&#8217;t need or request an increase in the maximum number of stacks in your AWS account. For more information, see AWS Service Limits in the <em>AWS General Reference<\/em>.    <\/td><\/tr><tr><td>StackSets   <\/td><td>Maximum number of AWS CloudFormation stack sets you can create in your administrator account.    <\/td><td>100 stack sets   <\/td><td>To create more stack sets, delete stack sets that you don&#8217;t need or request an increase in the maximum number of stack sets in your AWS account.   For more information, see AWS Service Limits in the <em>AWS General Reference<\/em>.      <\/td><\/tr><tr><td>Stack instances   <\/td><td>Maximum number of stack instances you can create per stack set.   <\/td><td>2000 stack instances per stack set   <\/td><td>To create more stack instances, delete stack instances that you don&#8217;t need or request an increase in the maximum number of stack instances in your AWS   account. For more information, see AWS Service Limits in the <em>AWS General   Reference<\/em>.    <\/td><\/tr><tr><td>StackSets instance operations   <\/td><td>Maximum number of stack instance operations you can run in each region at the same time, per administrator account.    <\/td><td>3500 operations   <\/td><td><\/td><\/tr><tr><td>Template body size in a request   <\/td><td>Maximum size of a template body that you can pass in a <code>CreateStack<\/code>, <code>UpdateStack<\/code>, or <code>ValidateTemplate<\/code> request.    <\/td><td>51,200 bytes   <\/td><td>To use a larger template body, separate your template into multiple templates by using, for example, nested stacks. Or upload the template to an   Amazon S3 bucket.    <\/td><\/tr><tr><td>\n  Template body size in an Amazon S3 object\n  <\/td><td>\n  Maximum size of a template body that you can pass in an Amazon S3 object\n  for a <code>CreateStack<\/code>, <code>UpdateStack<\/code>, <code>ValidateTemplate<\/code> request with an\n  Amazon S3 template URL. \n  <\/td><td>\n  460,800 bytes\n  <\/td><td>To use a larger template body, separate your template into multiple templates by using, for example, nested stacks.    <\/td><\/tr><tr><td>Template description   <\/td><td>Maximum size of a template description.   <\/td><td>1,024 bytes   <\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>CloudFormation Structure:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Parameters &#8211; way of passing data into CFN\ntemplate one or more values; ex: ip address, instance size, name, password etc;<\/li><li>AWS::EC2::KeyPair:KeyName; Default value,\nAllowed values, Allowed Patterns, Min &amp; MaxValue, Min &amp; MaxLength;<\/li><li>Outputs &#8211; way of displaying results of stack\ncreation; A stack can have many outputs, each output can be constructed value,\nparameter references, pseudo parameters or an output from a function such as\nfn::GetAtt or Ref; Ref references resource provide primary value such as\ninstance id; GetAtt provide alternate values such as private ip &amp; public\nip.<\/li><\/ul>\n\n\n\n<p><strong>Intrinsic &amp; Conditional Functions<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Intrinsic Fn &#8211; inbuilt function provided by AWS to help manage, reference, and conditionally act upon resources, situation &amp; inputs to a stack.<\/li><li>Fn::Base64 &#8211; Base64 encoding for User Data<\/li><li>Fn::FindInMap &#8211; Mapping lookup<\/li><li>Fn::GetAtt &#8211; Advanced reference look up<\/li><li>Fn::GetAZs &#8211; retrieve list of AZs in a region<\/li><li>Fn::Join &#8211; construct complex strings; concatenate strings<\/li><li>Fn::Select &#8211; value selection from list (0, 1) <\/li><li>Ref &#8211; default value of resource<\/li><li>Conditional Functions &#8211; Fn::And, Fn::Equals, Fn::If, Fn::Not, Fn::Or<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>It is a AWS service Used to model and set up AWS resources create a template to describes AWS resources needed responsible for provisioning and configuring AWS resources It simplifies Infrastructure Management Cloud formation template describes all needed resources and their properties. It provisions Auto Scaling group load balancer and database Can easily edit or&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2084,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[7,383,372,380],"class_list":["post-2124","page","type-page","status-publish","hentry","category-amazon-aws","tag-aws","tag-containers","tag-devops","tag-devops-engineer"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CloudFormation Concepts - Testprep Training Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CloudFormation Concepts - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"It is a AWS service Used to model and set up AWS resources create a template to describes AWS resources needed responsible for provisioning and configuring AWS resources It simplifies Infrastructure Management Cloud formation template describes all needed resources and their properties. It provisions Auto Scaling group load balancer and database Can easily edit or...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-02T07:35:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image017-1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/\",\"name\":\"CloudFormation Concepts - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-08-22T07:23:35+00:00\",\"dateModified\":\"2020-05-02T07:35:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Certified DevOps Engineer Professional\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CloudFormation Concepts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CloudFormation Concepts - Testprep Training Tutorials","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/","og_locale":"en_US","og_type":"article","og_title":"CloudFormation Concepts - Testprep Training Tutorials","og_description":"It is a AWS service Used to model and set up AWS resources create a template to describes AWS resources needed responsible for provisioning and configuring AWS resources It simplifies Infrastructure Management Cloud formation template describes all needed resources and their properties. It provisions Auto Scaling group load balancer and database Can easily edit or...","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-05-02T07:35:14+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image017-1.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/","name":"CloudFormation Concepts - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-08-22T07:23:35+00:00","dateModified":"2020-05-02T07:35:14+00:00","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/cloudformation-concepts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AWS Certified DevOps Engineer Professional","item":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/"},{"@type":"ListItem","position":3,"name":"CloudFormation Concepts"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=2124"}],"version-history":[{"count":4,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2124\/revisions"}],"predecessor-version":[{"id":5271,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2124\/revisions\/5271"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2084"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=2124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=2124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=2124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}