SlideShare a Scribd company logo
1 of 20
Download to read offline
An introduction to AWS CloudFormation
Julien Simon
Principal Technical Evangelist
Amazon Web Services
julsimon@amazon.fr
@julsimon
AWS CloudFormation
•  Fundamental service in AWS used for automating
deployment and configuration of resources
•  CloudFormation Template
•  JSON-formatted document which describes a configuration to
be deployed in an AWS account
•  When deployed, refers to a “stack” of resources
•  Not a “script”, a document
AWS CloudFormation
Infrastructure as code
•  Versioned, auditable blueprints (developers can contribute)
•  Quick to deploy, repeatable, tested infrastructure
•  Enables CI/CD for infrastructure (just like everything else)
•  Deploy many times, anywhere
Typical use cases for AWS CloudFormation
•  Used internally by many AWS products (Elastic Beanstalk, ECS)
•  Replicating environments
•  Dev, staging, pre-production, production
•  Same architecture, different sizing à template + parameters
•  Deploying in a different region
•  Green / blue deployments
•  Disaster Recovery
Case study: Viadeo
https://www.youtube.com/watch?v=JJm4V5fd0Z8
CloudFormation Template Structure
Resources
Describe detailed configuration of
a resource in AWS
Include, but not limited to:
•  IAM Policies, Users, Groups,
Roles
•  VPCs, Subnets, NACLs, Security
Groups
•  EC2 instances, AutoScaling
Groups
•  RDS Databases, S3 Buckets
•  Elastic Load Balancers
•  CloudWatch Alarms
•  Lambda Functions
•  Logging (CloudTrail, CW Logs)
Nested Templates
•  CloudFormation stacks themselves can be resources
“AWS::CloudFormation::Stack”
•  Useful for making reusable templates, segmenting
resources, and avoiding template size limitations
•  Launching a template with nested stacks will launch
multiple sub-stacks
•  Deleting the launching stack will, by default, delete all
substacks
Parameters
•  Used to pass in variables
when launching a stack
•  Use the “Ref” function to
reference these variables
in the Resources section
of the template
Mappings
•  Provides a set of custom named-value pairs
•  Use for setting values based on different
possible conditions (most notably, regions)
•  Commonly used for mapping different AMI
IDs to make template reusable across
multiple AWS regions
•  Use the FindInMap function when
referencing in resources
"ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}
Conditions
•  Allow you to determine if a resource gets created or a
property is defined
•  The “Condition” attribute applied to any resource to
specify a condition defined in the “Conditions” section of
the template
•  Condition must evaluate to true, otherwise the resource
will not get created
"MountPoint" :
{
"Type" : "AWS::EC2::VolumeAttachment",
"Condition" : "CreateProdResources",
"Properties" : {
"InstanceId" : { "Ref" : "EC2Instance" },
"VolumeId" : { "Ref" : "NewVolume" },
"Device" : "/dev/sdh“
}
}
AWS CloudFormation best practices
•  Don’t start from scratch
•  Read sample templates
•  Use CloudFormer as a starting point (more info on the next slide)
•  Reuse as much as possible
•  Don’t go crazy on nested stacks… 1 level should be enough
•  Use parameters: environment, region, instance names, instance sizes, etc..
•  Tag everything with the stack name and version number
CloudFormer
https://aws.amazon.com/developertools/6460180344805680
A new EC2 instance running CloudFormer will be started.
Connect to it, let it describe all your resources
Select the ones that you want to see listed in the template
Let’s summon the clouds!
Create a CodeCommit repository
to version our stacks
Create, update, delete
a basic stack
Create a VPC with 4 subnets. Add
a public instance.
Create A LAMP stack
Using CloudFormer
Demo gods, I’m your humble servant, please be good to me
Create a Git repository with AWS CodeCommit
$ aws codecommit create-repository
--repository-name cfdemo --region us-east-1
--repository-description ”CloudFormation
demo"
$ git clone ssh://git-codecommit.us-
east-1.amazonaws.com/v1/repos/cfdemo
Managing AWS CloudFormation with the CLI
$ aws cloudformation validate-template --template-body
file://template.json
$ aws cloudformation create-stack --template-body file://
template.json --stack-name MyTemplate --region eu-west-1
$ aws cloudformation get-template --stack-name MyTemplate
$ aws cloudformation update-stack --stack-name MyTemplate
--template-body file://template.json
$ aws cloudformation delete-stack --stack-name MyTemplate
AWS CloudFormation resources
Documentation
https://aws.amazon.com/fr/documentation/cloudformation/
https://docs.aws.amazon.com/fr_fr/AWSCloudFormation/latest/UserGuide/cfn-sample-templates.html
Blogs
https://aws.amazon.com/fr/blogs/aws/category/aws-cloud-formation/
https://blogs.aws.amazon.com/application-management/blog/tag/CloudFormation
Sessions @ AWS re:Invent 2015
ARC307 - Infrastructure as Code: slides and video
ARC401 - Cloud First: New Architecture for New Infrastructure: slides and video
DVO303 - Scaling Infrastructure Operations with AWS: slides and video
DVO304 - AWS CloudFormation Best Practices: slides and video
DVO310 - Benefit from DevOps When Moving to AWS for Windows: slides and video
DVO401 - Deep Dive into Blue/Green Deployments on AWS: slides and video
SEC312 - Reliable Design and Deployment of Security and Compliance: slides and video
Julien Simon
Principal Technical Evangelist, AWS
julsimon@amazon.fr
@julsimon

More Related Content

What's hot

What's hot (20)

Getting Started with Amazon EC2
Getting Started with Amazon EC2Getting Started with Amazon EC2
Getting Started with Amazon EC2
 
Infrastructure as Code in AWS using Cloudformation
Infrastructure as Code in AWS using CloudformationInfrastructure as Code in AWS using Cloudformation
Infrastructure as Code in AWS using Cloudformation
 
AWS networking fundamentals
AWS networking fundamentalsAWS networking fundamentals
AWS networking fundamentals
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
AWS Elastic Compute Cloud (EC2)
AWS Elastic Compute Cloud (EC2) AWS Elastic Compute Cloud (EC2)
AWS Elastic Compute Cloud (EC2)
 
Intro to AWS: Amazon EC2 and Compute Services
Intro to AWS: Amazon EC2 and Compute ServicesIntro to AWS: Amazon EC2 and Compute Services
Intro to AWS: Amazon EC2 and Compute Services
 
AWS IAM Tutorial | Identity And Access Management (IAM) | AWS Training Videos...
AWS IAM Tutorial | Identity And Access Management (IAM) | AWS Training Videos...AWS IAM Tutorial | Identity And Access Management (IAM) | AWS Training Videos...
AWS IAM Tutorial | Identity And Access Management (IAM) | AWS Training Videos...
 
AWS CloudFormation Best Practices
AWS CloudFormation Best PracticesAWS CloudFormation Best Practices
AWS CloudFormation Best Practices
 
Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for Kubernetes
 
Kubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSKubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKS
 
Amazon ECS
Amazon ECSAmazon ECS
Amazon ECS
 
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
Cloudwatch: Monitoring your AWS services with Metrics and AlarmsCloudwatch: Monitoring your AWS services with Metrics and Alarms
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
 
Identity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS SecurityIdentity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS Security
 
AWS SQS SNS
AWS SQS SNSAWS SQS SNS
AWS SQS SNS
 
Cost Optimisation on AWS
Cost Optimisation on AWSCost Optimisation on AWS
Cost Optimisation on AWS
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
AWS IAM -- Notes of 20130403 Doc Version
AWS IAM -- Notes of 20130403 Doc VersionAWS IAM -- Notes of 20130403 Doc Version
AWS IAM -- Notes of 20130403 Doc Version
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Identity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS SecurityIdentity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS Security
 
How to use IAM roles grant access to AWS
How to use IAM roles grant access to AWSHow to use IAM roles grant access to AWS
How to use IAM roles grant access to AWS
 

Viewers also liked

(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...
(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...
(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...
Amazon Web Services
 

Viewers also liked (20)

RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012
RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012
RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012
 
Mastering the fundamentals of AWS billing 8-20-15
Mastering the fundamentals of AWS billing 8-20-15Mastering the fundamentals of AWS billing 8-20-15
Mastering the fundamentals of AWS billing 8-20-15
 
RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012
RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012
RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012
 
(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...
(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...
(ARC302) Running Lean Architectures: How to Optimize for Cost Efficiency | AW...
 
AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings
 
(ARC304) Designing for SaaS: Next-Generation Software Delivery Models on AWS ...
(ARC304) Designing for SaaS: Next-Generation Software Delivery Models on AWS ...(ARC304) Designing for SaaS: Next-Generation Software Delivery Models on AWS ...
(ARC304) Designing for SaaS: Next-Generation Software Delivery Models on AWS ...
 
A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormation
 
Infrastructure as Code with AWS CloudFormation
Infrastructure as Code with AWS CloudFormationInfrastructure as Code with AWS CloudFormation
Infrastructure as Code with AWS CloudFormation
 
How to Design for High Availability & Scale with AWS
How to Design for High Availability & Scale with AWSHow to Design for High Availability & Scale with AWS
How to Design for High Availability & Scale with AWS
 
AWS re:Invent 2016: Metering Big Data at AWS: From 0 to 100 Million Records i...
AWS re:Invent 2016: Metering Big Data at AWS: From 0 to 100 Million Records i...AWS re:Invent 2016: Metering Big Data at AWS: From 0 to 100 Million Records i...
AWS re:Invent 2016: Metering Big Data at AWS: From 0 to 100 Million Records i...
 
AWS Webcast - High Availability with Route 53 DNS Failover
AWS Webcast - High Availability with Route 53 DNS FailoverAWS Webcast - High Availability with Route 53 DNS Failover
AWS Webcast - High Availability with Route 53 DNS Failover
 
Event-Driven Serverless Apps - Pop-up Loft Tel Aviv
Event-Driven Serverless Apps - Pop-up Loft Tel AvivEvent-Driven Serverless Apps - Pop-up Loft Tel Aviv
Event-Driven Serverless Apps - Pop-up Loft Tel Aviv
 
Next Generation Open Data Platforms | AWS Public Sector Summit 2016
Next Generation Open Data Platforms | AWS Public Sector Summit 2016Next Generation Open Data Platforms | AWS Public Sector Summit 2016
Next Generation Open Data Platforms | AWS Public Sector Summit 2016
 
Ingest and storage options
Ingest and storage optionsIngest and storage options
Ingest and storage options
 
Movidiam
MovidiamMovidiam
Movidiam
 
Using amazon machine learning to identify trends in io t data technical 201
Using amazon machine learning to identify trends in io t data   technical 201Using amazon machine learning to identify trends in io t data   technical 201
Using amazon machine learning to identify trends in io t data technical 201
 
Sundog Media Toolkit
Sundog Media Toolkit Sundog Media Toolkit
Sundog Media Toolkit
 
Women in Technology: Supporting Diversity in a Technical Workplace
Women in Technology: Supporting Diversity in a Technical WorkplaceWomen in Technology: Supporting Diversity in a Technical Workplace
Women in Technology: Supporting Diversity in a Technical Workplace
 
DevOps en Amazon: Un vistazo a nuestras herramientas y procesos
DevOps en Amazon: Un vistazo a nuestras herramientas y procesosDevOps en Amazon: Un vistazo a nuestras herramientas y procesos
DevOps en Amazon: Un vistazo a nuestras herramientas y procesos
 
AWS Mobile Hub
AWS Mobile HubAWS Mobile Hub
AWS Mobile Hub
 

Similar to An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv

Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesWorkshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Amazon Web Services
 

Similar to An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv (20)

AWS CloudFormation (February 2016)
AWS CloudFormation (February 2016)AWS CloudFormation (February 2016)
AWS CloudFormation (February 2016)
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
Dev & Test on AWS - Hebrew Webinar
Dev & Test on AWS - Hebrew WebinarDev & Test on AWS - Hebrew Webinar
Dev & Test on AWS - Hebrew Webinar
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Cloud Formation
Cloud FormationCloud Formation
Cloud Formation
 
Dev & Test on AWS Webinar October 2017 - IL Webinar
Dev & Test on AWS Webinar October 2017 - IL WebinarDev & Test on AWS Webinar October 2017 - IL Webinar
Dev & Test on AWS Webinar October 2017 - IL Webinar
 
(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices
 
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as CodeAWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
 
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Deep Dive - Infrastructure as Code
Deep Dive - Infrastructure as CodeDeep Dive - Infrastructure as Code
Deep Dive - Infrastructure as Code
 
Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormation
 
Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormation
 
saa3_wk5.pdf
saa3_wk5.pdfsaa3_wk5.pdf
saa3_wk5.pdf
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
 
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
 
Infrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web ServicesInfrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web Services
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesWorkshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv

  • 1. An introduction to AWS CloudFormation Julien Simon Principal Technical Evangelist Amazon Web Services julsimon@amazon.fr @julsimon
  • 2. AWS CloudFormation •  Fundamental service in AWS used for automating deployment and configuration of resources •  CloudFormation Template •  JSON-formatted document which describes a configuration to be deployed in an AWS account •  When deployed, refers to a “stack” of resources •  Not a “script”, a document
  • 4.
  • 5. Infrastructure as code •  Versioned, auditable blueprints (developers can contribute) •  Quick to deploy, repeatable, tested infrastructure •  Enables CI/CD for infrastructure (just like everything else) •  Deploy many times, anywhere
  • 6. Typical use cases for AWS CloudFormation •  Used internally by many AWS products (Elastic Beanstalk, ECS) •  Replicating environments •  Dev, staging, pre-production, production •  Same architecture, different sizing à template + parameters •  Deploying in a different region •  Green / blue deployments •  Disaster Recovery
  • 9. Resources Describe detailed configuration of a resource in AWS Include, but not limited to: •  IAM Policies, Users, Groups, Roles •  VPCs, Subnets, NACLs, Security Groups •  EC2 instances, AutoScaling Groups •  RDS Databases, S3 Buckets •  Elastic Load Balancers •  CloudWatch Alarms •  Lambda Functions •  Logging (CloudTrail, CW Logs)
  • 10. Nested Templates •  CloudFormation stacks themselves can be resources “AWS::CloudFormation::Stack” •  Useful for making reusable templates, segmenting resources, and avoiding template size limitations •  Launching a template with nested stacks will launch multiple sub-stacks •  Deleting the launching stack will, by default, delete all substacks
  • 11. Parameters •  Used to pass in variables when launching a stack •  Use the “Ref” function to reference these variables in the Resources section of the template
  • 12. Mappings •  Provides a set of custom named-value pairs •  Use for setting values based on different possible conditions (most notably, regions) •  Commonly used for mapping different AMI IDs to make template reusable across multiple AWS regions •  Use the FindInMap function when referencing in resources "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}
  • 13. Conditions •  Allow you to determine if a resource gets created or a property is defined •  The “Condition” attribute applied to any resource to specify a condition defined in the “Conditions” section of the template •  Condition must evaluate to true, otherwise the resource will not get created "MountPoint" : { "Type" : "AWS::EC2::VolumeAttachment", "Condition" : "CreateProdResources", "Properties" : { "InstanceId" : { "Ref" : "EC2Instance" }, "VolumeId" : { "Ref" : "NewVolume" }, "Device" : "/dev/sdh“ } }
  • 14. AWS CloudFormation best practices •  Don’t start from scratch •  Read sample templates •  Use CloudFormer as a starting point (more info on the next slide) •  Reuse as much as possible •  Don’t go crazy on nested stacks… 1 level should be enough •  Use parameters: environment, region, instance names, instance sizes, etc.. •  Tag everything with the stack name and version number
  • 15. CloudFormer https://aws.amazon.com/developertools/6460180344805680 A new EC2 instance running CloudFormer will be started. Connect to it, let it describe all your resources Select the ones that you want to see listed in the template
  • 16. Let’s summon the clouds! Create a CodeCommit repository to version our stacks Create, update, delete a basic stack Create a VPC with 4 subnets. Add a public instance. Create A LAMP stack Using CloudFormer Demo gods, I’m your humble servant, please be good to me
  • 17. Create a Git repository with AWS CodeCommit $ aws codecommit create-repository --repository-name cfdemo --region us-east-1 --repository-description ”CloudFormation demo" $ git clone ssh://git-codecommit.us- east-1.amazonaws.com/v1/repos/cfdemo
  • 18. Managing AWS CloudFormation with the CLI $ aws cloudformation validate-template --template-body file://template.json $ aws cloudformation create-stack --template-body file:// template.json --stack-name MyTemplate --region eu-west-1 $ aws cloudformation get-template --stack-name MyTemplate $ aws cloudformation update-stack --stack-name MyTemplate --template-body file://template.json $ aws cloudformation delete-stack --stack-name MyTemplate
  • 19. AWS CloudFormation resources Documentation https://aws.amazon.com/fr/documentation/cloudformation/ https://docs.aws.amazon.com/fr_fr/AWSCloudFormation/latest/UserGuide/cfn-sample-templates.html Blogs https://aws.amazon.com/fr/blogs/aws/category/aws-cloud-formation/ https://blogs.aws.amazon.com/application-management/blog/tag/CloudFormation Sessions @ AWS re:Invent 2015 ARC307 - Infrastructure as Code: slides and video ARC401 - Cloud First: New Architecture for New Infrastructure: slides and video DVO303 - Scaling Infrastructure Operations with AWS: slides and video DVO304 - AWS CloudFormation Best Practices: slides and video DVO310 - Benefit from DevOps When Moving to AWS for Windows: slides and video DVO401 - Deep Dive into Blue/Green Deployments on AWS: slides and video SEC312 - Reliable Design and Deployment of Security and Compliance: slides and video
  • 20. Julien Simon Principal Technical Evangelist, AWS julsimon@amazon.fr @julsimon