1. CloudFormation
Cloudformation allows you to manage, configre and provision AWS infrastructure as code (YAML / JSON)
Its main sections in the cloud formation Template are :
- Parameters : input custom values
- Condition (e.g. provision resources based on environment)
- Resources : mandatory the AWS ressource to create
- Mappings : create custom mapping like Region : AMI
- Transform : reference code located in S3, e.g. Lambda code or reusable snippets of CloudFormation code
2. CloudFormation Lab
Stack name of the cloud formation
Rollback formation available
3. Serverless Application Model (SAM)
introduction
- SAM : extension of Cloud Formation, used to define serverless applications
- Simplified syntax for defininf severless resources : APIs, Lambda Functions, BynamoDB
- SAM CLI used to package your code deployment.
SAM CLI Commands
- sam package : packages your application and upload to S3
- sam deploy : deploys your serverless app using CloudFormation
4. CloudFormation & SAM Lab
purpose : deploy a lambda using cloudformation and sam
steps
- install the same CLI
- check the version ̀sam --version`
- create an s3 bucket
- check the iam user access permission -> add full access to s3
- Define an index.js
- Define lambda.yml
- SAM deploy by using the sam-template.yml
- Test the lambda function
- Simply create a cloud formation template,
- store it in S3
- reference it in the resources section of any cloudFormation template using the Stack resource type
5. CloudFormation Nested Stacks
Nested Stack
- Nested Stacks : allow re-use of CloudFormation code for common use cases = template within a template
- instead of copying out the code each time, create a standard template fo reach common use case and reference from within your CloudFormation template
CloudFormation Template Structure
-
Resources :
- Type (mandatory): AWS:CloudFormation::Stack
- Properties
- Parameters
- Tags
- TemplateURL (mandatory) : https:..s3.amazonaws.com/.../templates.yml
- TimeoutInMinutes
6. AWS OpsWorks
definition
OpsWorks is a service which allows you yo automate your server configuration using Puppet or Chef
It is a fully managed service so you do not need to configure and operate your own configuration management environment






