{"componentChunkName":"component---src-templates-blog-js","path":"/ctf/aws-formation/tp10-automation","result":{"data":{"markdownRemark":{"html":"<h2>1. CloudFormation</h2>\n<p><strong>Cloudformation</strong> allows you to manage, configre and provision AWS infrastructure as code (YAML / JSON)</p>\n<p>Its main sections in the cloud formation Template are :</p>\n<ul>\n<li>Parameters : input custom values</li>\n<li>Condition (e.g. provision resources based on environment) </li>\n<li>Resources : <strong>mandatory</strong> the AWS ressource to create</li>\n<li>Mappings : create custom mapping like Region : AMI</li>\n<li>Transform : reference code located in S3, e.g. Lambda code or reusable snippets of CloudFormation code</li>\n</ul>\n<h2>2. CloudFormation Lab</h2>\n<p>Stack name of the cloud formation</p>\n<p>Rollback formation available</p>\n<h2>3. Serverless Application Model (SAM)</h2>\n<h3>introduction</h3>\n<ul>\n<li><strong>SAM</strong> : extension of Cloud Formation,  used to define serverless applications</li>\n<li>Simplified syntax for defininf severless resources : APIs, Lambda Functions, BynamoDB</li>\n<li>SAM CLI used to package your code deployment.</li>\n</ul>\n<h3>SAM CLI Commands</h3>\n<ul>\n<li>sam package : <strong>packages</strong> your application and upload to S3</li>\n<li>sam deploy : <strong>deploys</strong> your serverless app using CloudFormation</li>\n</ul>\n<h2>4. CloudFormation &#x26; SAM Lab</h2>\n<p>purpose : deploy a lambda using cloudformation and sam</p>\n<h3>steps</h3>\n<ol>\n<li>install the same CLI</li>\n<li>check the version  ̀sam --version`</li>\n<li>create an s3 bucket</li>\n<li>check the iam user access permission -> add full access to s3</li>\n<li>Define an index.js</li>\n<li>Define lambda.yml </li>\n<li>SAM deploy by using the sam-template.yml</li>\n<li>Test the lambda function</li>\n<li>Simply create a cloud formation template, </li>\n<li>store it in S3</li>\n<li>reference it in the resources section of any cloudFormation template using the <strong>Stack</strong> resource type</li>\n</ol>\n<h2>5. CloudFormation Nested Stacks</h2>\n<h3>Nested Stack</h3>\n<ul>\n<li>Nested Stacks : allow re-use of CloudFormation code for common use cases = template within a template</li>\n<li>instead of copying out the code each time, create a standard template fo reach common use case and reference from within your CloudFormation template</li>\n</ul>\n<h3>CloudFormation Template Structure</h3>\n<ul>\n<li>\n<p>Resources :</p>\n<ul>\n<li>Type (mandatory): AWS:CloudFormation::Stack</li>\n<li>Properties</li>\n<li>Parameters</li>\n<li>Tags</li>\n<li>TemplateURL (mandatory) : https:..s3.amazonaws.com/.../templates.yml</li>\n<li>TimeoutInMinutes</li>\n</ul>\n</li>\n</ul>\n<h2>6. AWS OpsWorks</h2>\n<h3>definition</h3>\n<p><strong>OpsWorks</strong> is a service which allows you yo automate your server configuration using Puppet or Chef</p>\n<p>It is a fully managed service so you do not need to configure and operate your own configuration management environment</p>","frontmatter":{"date":"July 31, 2020","path":"ctf/aws-formation/tp10-automation","title":"TP10 - Automation","tags":["cloud","ec2","aws"],"categorie":"ctf","thumbnail":"/assets/alex-machado-80sv993luki-unsplash.jpg"},"fields":{"readingTime":{"text":"2 min read"}}},"file":{"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAMEBf/EABUBAQEAAAAAAAAAAAAAAAAAAAED/9oADAMBAAIQAxAAAAGFz11jKaIn/8QAGhAAAgMBAQAAAAAAAAAAAAAAAAECERMSMf/aAAgBAQABBQLm3gxwaJTxe1i8/8QAGBEAAgMAAAAAAAAAAAAAAAAAAAECElH/2gAIAQMBAT8BUdKn/8QAFhEBAQEAAAAAAAAAAAAAAAAAABEB/9oACAECAQE/Abqv/8QAGhAAAQUBAAAAAAAAAAAAAAAAAQACEBESIv/aAAgBAQAGPwJckOjObVBtR//EABwQAQACAgMBAAAAAAAAAAAAAAEAETFBIWFxkf/aAAgBAQABPyEVB9ih2jUSxfkFQDkWX4Ju5grU/9oADAMBAAIAAwAAABDjD//EABYRAQEBAAAAAAAAAAAAAAAAAAEAIf/aAAgBAwEBPxAA1M//xAAWEQEBAQAAAAAAAAAAAAAAAAABIRD/2gAIAQIBAT8QWYTP/8QAGhABAQEAAwEAAAAAAAAAAAAAAREAIUFxwf/aAAgBAQABPxAYkFlcFzRnCFCH3zCCggiKI5gk6hL1lpwEhs0zEABv/9k=","aspectRatio":1.4970059880239521,"src":"/static/11cdcb302d032fa2db3a46428a8f74c9/a7715/alex-machado-80sv993luki-unsplash.jpg","srcSet":"/static/11cdcb302d032fa2db3a46428a8f74c9/8f7df/alex-machado-80sv993luki-unsplash.jpg 250w,\n/static/11cdcb302d032fa2db3a46428a8f74c9/0f3a1/alex-machado-80sv993luki-unsplash.jpg 500w,\n/static/11cdcb302d032fa2db3a46428a8f74c9/a7715/alex-machado-80sv993luki-unsplash.jpg 1000w,\n/static/11cdcb302d032fa2db3a46428a8f74c9/37d86/alex-machado-80sv993luki-unsplash.jpg 1500w,\n/static/11cdcb302d032fa2db3a46428a8f74c9/a41d1/alex-machado-80sv993luki-unsplash.jpg 2000w,\n/static/11cdcb302d032fa2db3a46428a8f74c9/6a059/alex-machado-80sv993luki-unsplash.jpg 6000w","sizes":"(max-width: 1000px) 100vw, 1000px"}}}},"pageContext":{"slug":"ctf/aws-formation/tp10-automation","featuredImage":"alex-machado-80sv993luki-unsplash.jpg"}}}