SlideShare a Scribd company logo
1 of 27
Download to read offline
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Julien Simon
Principal Technical Evangelist, AWS
julsimon@amazon.fr
@julsimon

Infrastructure as code
with Amazon Web Services
You’re more than welcome to tweet about this webinar



@julsimon @aws_actus #aws #devops
Agenda
•  Infrastructure as code
•  AWS CloudFormation
•  Hashicorp Terraform
•  Troposphere
Why infrastructure as code rocks
Automated: save time & reduce human error

Predictable: build the same infra every time

Traceable: keep track of all changes

Testable: make sure best practices are built-in

You don’t get all of this with scripting
Typical use cases
•  Building as many environments as you need
•  Development, staging, pre-production, production
•  Same architecture, different sizing à template + parameters
•  Deploying in a different region
•  Performing green / blue deployments
•  Preparing for Disaster Recovery
AWS CloudFormation
AWS CloudFormation
•  Fundamental service used to automate creation, configuration
and destruction of AWS resources (VPC, EC2, RDS, etc.)
•  Infrastructure is described in a template
•  JSON or YAML file. Not a script!
•  Resources, Parameters, Outputs, etc.
•  CloudFormation ingests the template and builds "
a stack of AWS resources

•  Pricing: no charge
AWS CloudFormation
CloudFormation Template
The CloudFormation CLI in one slide
$ aws cloudformation validate-template 

--template-body file://template.json
$ aws cloudformation create-stack 

--template-body file://template.json --stack-name MyTemplate
$ 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
Change sets
•  CloudFormation used to be ‘fire and forget’
•  Or sometimes ‘fire and remember all your life’ ;)
•  Change sets have been introduced to preview effects of stack
creations and stack updates
•  Please use them!
•  aws cloudformation create-change-set
•  aws cloudformation describe-change-set
•  aws cloudformation execute-change-set
•  aws cloudformation delete-change-set
Example: creating a new stack with a change set
$ aws cloudformation create-change-set 

--stack-name Template0 --template-body file://template0.json 

--change-set-type CREATE --change-set-name createTemplate0
{
. . .
"Status": "CREATE_COMPLETE",
"ChangeSetName": "createTemplate0",
"Changes": [
{
"ResourceChange": {
"Action": "Add",
"ResourceType": "AWS::EC2::Instance",
"Scope": [],
"Details": [],
"LogicalResourceId": "Ec2Instance0"
},
"Type": "Resource"
. . .
"
"
CloudFormation demo"
"
"
"
Starting stuff, updating it, deleting it"
"
https://github.com/juliensimon/aws/tree/master/CF/cfdemo
Terraform
Terraform
•  Open source project initiated by Hashicorp"
https://github.com/hashicorp/terraform 
•  Infrastructure is described in a configuration, written in
Hashicorp Configuration Language (HCL) 
•  Why HCL? https://github.com/hashicorp/hcl#why 
•  Support for many cloud / SaaS providers, but not an
abstraction layer for “multi-cloud” (whatever that is)
•  What I like about Terraform
•  Very easy to preview modifications
•  Ability to take drift into account (could be risky, though)
The Terraform CLI in one slide
$ terraform plan

$ terraform apply

$ terraform show

$ terraform plan -destroy

$ terraform destroy
"
"
Terraform demo"
"
"
"
Same thing, but different"
"
https://github.com/juliensimon/aws/tree/master/CF/terraform/
Troposphere
Troposphere
•  Open source project"
https://github.com/cloudtools/troposphere
•  Write Python code that generates a CloudFormation
template (JSON), then use CloudFormation to build the
stack 
•  What I like about Troposphere: more natural to write and
debug than JSON / YML / HCL
"
"
Troposphere demo"
"
"
"
Because why not?"
"
https://github.com/juliensimon/aws/tree/master/CF/troposphere/
Summing things up
CloudFormation
 Troposphere
 Terraform
Project nature
 AWS service
 Open Source (1700+ stars)
 Open Source (7000+ stars)
Service coverage
 Best. Used internally by EB,
ECS, SAM, etc.
Very good for most services.
 Very good. Many other cloud /
SaaS providers.
Language
 JSON, YML
 Python (to JSON)
 HCL
Interface
 CLI, GUI
 CLI
Multi-user
 Yes (IAM)
 No
Drift detection
 No
 Yes (‘refresh’)
Existing resources
 Yes (with CloudFormer)
 Yes (with CloudFormer, cfn2py)
 Yes (with terraforming)
Continuous deployment
 Yes (with CodePipeline)
 No (build your own)
Preview updates
 Yes (change sets)
 Yes (‘plan’)
Rollbacks
 Yes
 No (in Open Source version)
Multi-account & multi-region 
 Yes (with Lambda)
 Yes
Other features
 Quick Starts
 Access to Python libraries
 Terraform console
Now what?
•  CloudFormation, Terraform and Troposphere allow you to run
automated and predictable infrastructure builds in any AWS
region.
•  Wait, there’s more work!
•  Automate AMI builds - Aminator (Netflix), Packer (Hashicorp)
•  Automate service provisioning - Puppet, Ansible, Chef, AWS OpsWorks
•  Automate application deployment - Code*
•  DevOps is a long journey, just take one step at a time J
Additional resources
http://aws.amazon.com/cloudformation
https://aws.amazon.com/fr/blogs/mt/ 
https://aws.amazon.com/fr/new/#management-tools 

https://www.terraform.io/
https://github.com/cloudtools/troposphere

https://github.com/stelligent/cfn_nag 
https://github.com/dtan4/terraforming 

http://aws.amazon.com/free 
http://console.aws.amazon.com
AWS User Groups
Lille
Paris
Rennes
Nantes
Bordeaux
Lyon
Montpellier
Toulouse
Côte d’Azur (new!)
facebook.com/groups/AWSFrance/
@aws_actus
https://aws.amazon.com/fr/events/webinaires/
Merci !
Julien Simon
Principal Technical Evangelist, AWS
julsimon@amazon.fr
@julsimon

More Related Content

What's hot

What's hot (20)

Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)
 
Big Data answers in seconds with Amazon Athena
Big Data answers in seconds with Amazon AthenaBig Data answers in seconds with Amazon Athena
Big Data answers in seconds with Amazon Athena
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWS
 
An Overview of AWS IoT (November 2016)
An Overview of AWS IoT (November 2016)An Overview of AWS IoT (November 2016)
An Overview of AWS IoT (November 2016)
 
An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
An introduction to AWS CloudFormation - Pop-up Loft Tel AvivAn introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
 
AWS CloudFormation and Puppet at PuppetConf - Jinesh Varia
AWS CloudFormation and Puppet at PuppetConf - Jinesh VariaAWS CloudFormation and Puppet at PuppetConf - Jinesh Varia
AWS CloudFormation and Puppet at PuppetConf - Jinesh Varia
 
DevOps with Amazon Web Services (November 2016)
DevOps with Amazon Web Services (November 2016)DevOps with Amazon Web Services (November 2016)
DevOps with Amazon Web Services (November 2016)
 
AWS CloudFormation (February 2016)
AWS CloudFormation (February 2016)AWS CloudFormation (February 2016)
AWS CloudFormation (February 2016)
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
AWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar SeriesAWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar Series
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
Infrastructure as Code - AWS CloudFormation
Infrastructure as Code - AWS CloudFormationInfrastructure as Code - AWS CloudFormation
Infrastructure as Code - AWS CloudFormation
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
Building a Serverless Pipeline
Building a Serverless PipelineBuilding a Serverless Pipeline
Building a Serverless Pipeline
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
 
AWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorksAWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorks
 
AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings
 
AWS Webcast - AWS OpsWorks Continuous Integration Demo
AWS Webcast - AWS OpsWorks Continuous Integration Demo  AWS Webcast - AWS OpsWorks Continuous Integration Demo
AWS Webcast - AWS OpsWorks Continuous Integration Demo
 
Building CI-CD Pipelines for Serverless Applications
Building CI-CD Pipelines for Serverless ApplicationsBuilding CI-CD Pipelines for Serverless Applications
Building CI-CD Pipelines for Serverless Applications
 

Viewers also liked

Filafat ilmu kepolisian
Filafat ilmu kepolisianFilafat ilmu kepolisian
Filafat ilmu kepolisian
rara wibowo
 
Com clonar i com exportar i importar una màquina virtual
Com clonar i com exportar i importar una màquina virtualCom clonar i com exportar i importar una màquina virtual
Com clonar i com exportar i importar una màquina virtual
Edu Alias
 
Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)
Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)
Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)
Kevin Penalva-Halpin
 
презентація впм технологія емалей 2017
презентація  впм технологія емалей 2017презентація  впм технологія емалей 2017
презентація впм технологія емалей 2017
metallurg056
 

Viewers also liked (20)

Viadeo - Cost Driven Development
Viadeo - Cost Driven DevelopmentViadeo - Cost Driven Development
Viadeo - Cost Driven Development
 
Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)
 
Presentación dia de andalucia pedro
Presentación dia de andalucia pedroPresentación dia de andalucia pedro
Presentación dia de andalucia pedro
 
Filafat ilmu kepolisian
Filafat ilmu kepolisianFilafat ilmu kepolisian
Filafat ilmu kepolisian
 
Iot og personvern 2017
Iot og personvern 2017Iot og personvern 2017
Iot og personvern 2017
 
Com clonar i com exportar i importar una màquina virtual
Com clonar i com exportar i importar una màquina virtualCom clonar i com exportar i importar una màquina virtual
Com clonar i com exportar i importar una màquina virtual
 
Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)
Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)
Labo XX Antwerp - Densification strategies for the 20th century belt (BUUR)
 
Amazon AI (February 2017)
Amazon AI (February 2017)Amazon AI (February 2017)
Amazon AI (February 2017)
 
Repubblicanesimo, repubblicanismo, republicanismo, républicanisme, republican...
Repubblicanesimo, repubblicanismo, republicanismo, républicanisme, republican...Repubblicanesimo, repubblicanismo, republicanismo, républicanisme, republican...
Repubblicanesimo, repubblicanismo, republicanismo, républicanisme, republican...
 
Postmarxismo, post marxismo, post marxismo
Postmarxismo, post marxismo, post marxismoPostmarxismo, post marxismo, post marxismo
Postmarxismo, post marxismo, post marxismo
 
Património Cultural Português - Panteões de Portugal e Edifícios da Soberania...
Património Cultural Português - Panteões de Portugal e Edifícios da Soberania...Património Cultural Português - Panteões de Portugal e Edifícios da Soberania...
Património Cultural Português - Panteões de Portugal e Edifícios da Soberania...
 
Bonnes pratiques pour la gestion des opérations de sécurité AWS
Bonnes pratiques pour la gestion des opérations de sécurité AWSBonnes pratiques pour la gestion des opérations de sécurité AWS
Bonnes pratiques pour la gestion des opérations de sécurité AWS
 
IoT: it's all about Data!
IoT: it's all about Data!IoT: it's all about Data!
IoT: it's all about Data!
 
Amazon Inspector
Amazon InspectorAmazon Inspector
Amazon Inspector
 
Authentification et autorisation d'accès avec AWS IAM
Authentification et autorisation d'accès avec AWS IAMAuthentification et autorisation d'accès avec AWS IAM
Authentification et autorisation d'accès avec AWS IAM
 
презентація впм технологія емалей 2017
презентація  впм технологія емалей 2017презентація  впм технологія емалей 2017
презентація впм технологія емалей 2017
 
AWS re:Invent 2016 recap (part 2)
AWS re:Invent 2016 recap (part 2) AWS re:Invent 2016 recap (part 2)
AWS re:Invent 2016 recap (part 2)
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 
Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)
 
Writing drills
Writing drillsWriting drills
Writing drills
 

Similar to Infrastructure as code with Amazon Web Services

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 Infrastructure as code with Amazon Web Services (20)

Cloud Formation
Cloud FormationCloud Formation
Cloud Formation
 
(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices
 
TIAD : Automating the modern datacenter
TIAD : Automating the modern datacenterTIAD : Automating the modern datacenter
TIAD : Automating the modern datacenter
 
AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...
AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...
AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...
 
AWS Summit Sydney 2014 | Continuous Integration and Deployment Best Practices...
AWS Summit Sydney 2014 | Continuous Integration and Deployment Best Practices...AWS Summit Sydney 2014 | Continuous Integration and Deployment Best Practices...
AWS Summit Sydney 2014 | Continuous Integration and Deployment Best Practices...
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormation
 
DevOpsDaysRiga 2018: Anton Babenko - What you see is what you get… for AWS in...
DevOpsDaysRiga 2018: Anton Babenko - What you see is what you get… for AWS in...DevOpsDaysRiga 2018: Anton Babenko - What you see is what you get… for AWS in...
DevOpsDaysRiga 2018: Anton Babenko - What you see is what you get… for AWS in...
 
Dev & Test on AWS - Hebrew Webinar
Dev & Test on AWS - Hebrew WebinarDev & Test on AWS - Hebrew Webinar
Dev & Test on AWS - Hebrew Webinar
 
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
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
Reusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modulesReusable, composable, battle-tested Terraform modules
Reusable, composable, battle-tested Terraform modules
 
Architecting for the Cloud using NetflixOSS - Codemash Workshop
Architecting for the Cloud using NetflixOSS - Codemash WorkshopArchitecting for the Cloud using NetflixOSS - Codemash Workshop
Architecting for the Cloud using NetflixOSS - Codemash Workshop
 
Dallas Breakfast Seminar
Dallas Breakfast SeminarDallas Breakfast Seminar
Dallas Breakfast Seminar
 
AWS Elastic Beanstalk under the Hood (DMG301) | AWS re:Invent 2013
AWS Elastic Beanstalk under the Hood (DMG301) | AWS re:Invent 2013AWS Elastic Beanstalk under the Hood (DMG301) | AWS re:Invent 2013
AWS Elastic Beanstalk under the Hood (DMG301) | AWS re:Invent 2013
 
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
 
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
 
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
 
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
 
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
 
DevOpsCon Cloud Workshop
DevOpsCon Cloud Workshop DevOpsCon Cloud Workshop
DevOpsCon Cloud Workshop
 

More from Julien SIMON

More from Julien SIMON (20)

An introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging FaceAn introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging Face
 
Reinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face TransformersReinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face Transformers
 
Building NLP applications with Transformers
Building NLP applications with TransformersBuilding NLP applications with Transformers
Building NLP applications with Transformers
 
Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)
 
Starting your AI/ML project right (May 2020)
Starting your AI/ML project right (May 2020)Starting your AI/ML project right (May 2020)
Starting your AI/ML project right (May 2020)
 
Scale Machine Learning from zero to millions of users (April 2020)
Scale Machine Learning from zero to millions of users (April 2020)Scale Machine Learning from zero to millions of users (April 2020)
Scale Machine Learning from zero to millions of users (April 2020)
 
An Introduction to Generative Adversarial Networks (April 2020)
An Introduction to Generative Adversarial Networks (April 2020)An Introduction to Generative Adversarial Networks (April 2020)
An Introduction to Generative Adversarial Networks (April 2020)
 
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
 
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)
 
Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)
 
The Future of AI (September 2019)
The Future of AI (September 2019)The Future of AI (September 2019)
The Future of AI (September 2019)
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
 
Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)
 

Recently uploaded

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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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...
 
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...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Infrastructure as code with Amazon Web Services

  • 1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Julien Simon Principal Technical Evangelist, AWS julsimon@amazon.fr @julsimon Infrastructure as code with Amazon Web Services
  • 2. You’re more than welcome to tweet about this webinar @julsimon @aws_actus #aws #devops
  • 3. Agenda •  Infrastructure as code •  AWS CloudFormation •  Hashicorp Terraform •  Troposphere
  • 4.
  • 5. Why infrastructure as code rocks Automated: save time & reduce human error Predictable: build the same infra every time Traceable: keep track of all changes Testable: make sure best practices are built-in You don’t get all of this with scripting
  • 6. Typical use cases •  Building as many environments as you need •  Development, staging, pre-production, production •  Same architecture, different sizing à template + parameters •  Deploying in a different region •  Performing green / blue deployments •  Preparing for Disaster Recovery
  • 8. AWS CloudFormation •  Fundamental service used to automate creation, configuration and destruction of AWS resources (VPC, EC2, RDS, etc.) •  Infrastructure is described in a template •  JSON or YAML file. Not a script! •  Resources, Parameters, Outputs, etc. •  CloudFormation ingests the template and builds " a stack of AWS resources •  Pricing: no charge
  • 11. The CloudFormation CLI in one slide $ aws cloudformation validate-template 
 --template-body file://template.json $ aws cloudformation create-stack 
 --template-body file://template.json --stack-name MyTemplate $ 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
  • 12. Change sets •  CloudFormation used to be ‘fire and forget’ •  Or sometimes ‘fire and remember all your life’ ;) •  Change sets have been introduced to preview effects of stack creations and stack updates •  Please use them! •  aws cloudformation create-change-set •  aws cloudformation describe-change-set •  aws cloudformation execute-change-set •  aws cloudformation delete-change-set
  • 13. Example: creating a new stack with a change set $ aws cloudformation create-change-set 
 --stack-name Template0 --template-body file://template0.json 
 --change-set-type CREATE --change-set-name createTemplate0 { . . . "Status": "CREATE_COMPLETE", "ChangeSetName": "createTemplate0", "Changes": [ { "ResourceChange": { "Action": "Add", "ResourceType": "AWS::EC2::Instance", "Scope": [], "Details": [], "LogicalResourceId": "Ec2Instance0" }, "Type": "Resource" . . .
  • 14. " " CloudFormation demo" " " " Starting stuff, updating it, deleting it" " https://github.com/juliensimon/aws/tree/master/CF/cfdemo
  • 16. Terraform •  Open source project initiated by Hashicorp" https://github.com/hashicorp/terraform •  Infrastructure is described in a configuration, written in Hashicorp Configuration Language (HCL) •  Why HCL? https://github.com/hashicorp/hcl#why •  Support for many cloud / SaaS providers, but not an abstraction layer for “multi-cloud” (whatever that is) •  What I like about Terraform •  Very easy to preview modifications •  Ability to take drift into account (could be risky, though)
  • 17. The Terraform CLI in one slide $ terraform plan $ terraform apply $ terraform show $ terraform plan -destroy $ terraform destroy
  • 18. " " Terraform demo" " " " Same thing, but different" " https://github.com/juliensimon/aws/tree/master/CF/terraform/
  • 20. Troposphere •  Open source project" https://github.com/cloudtools/troposphere •  Write Python code that generates a CloudFormation template (JSON), then use CloudFormation to build the stack •  What I like about Troposphere: more natural to write and debug than JSON / YML / HCL
  • 21. " " Troposphere demo" " " " Because why not?" " https://github.com/juliensimon/aws/tree/master/CF/troposphere/
  • 22. Summing things up CloudFormation Troposphere Terraform Project nature AWS service Open Source (1700+ stars) Open Source (7000+ stars) Service coverage Best. Used internally by EB, ECS, SAM, etc. Very good for most services. Very good. Many other cloud / SaaS providers. Language JSON, YML Python (to JSON) HCL Interface CLI, GUI CLI Multi-user Yes (IAM) No Drift detection No Yes (‘refresh’) Existing resources Yes (with CloudFormer) Yes (with CloudFormer, cfn2py) Yes (with terraforming) Continuous deployment Yes (with CodePipeline) No (build your own) Preview updates Yes (change sets) Yes (‘plan’) Rollbacks Yes No (in Open Source version) Multi-account & multi-region Yes (with Lambda) Yes Other features Quick Starts Access to Python libraries Terraform console
  • 23. Now what? •  CloudFormation, Terraform and Troposphere allow you to run automated and predictable infrastructure builds in any AWS region. •  Wait, there’s more work! •  Automate AMI builds - Aminator (Netflix), Packer (Hashicorp) •  Automate service provisioning - Puppet, Ansible, Chef, AWS OpsWorks •  Automate application deployment - Code* •  DevOps is a long journey, just take one step at a time J
  • 24. Additional resources http://aws.amazon.com/cloudformation https://aws.amazon.com/fr/blogs/mt/ https://aws.amazon.com/fr/new/#management-tools https://www.terraform.io/ https://github.com/cloudtools/troposphere https://github.com/stelligent/cfn_nag https://github.com/dtan4/terraforming http://aws.amazon.com/free http://console.aws.amazon.com
  • 25. AWS User Groups Lille Paris Rennes Nantes Bordeaux Lyon Montpellier Toulouse Côte d’Azur (new!) facebook.com/groups/AWSFrance/ @aws_actus
  • 27. Merci ! Julien Simon Principal Technical Evangelist, AWS julsimon@amazon.fr @julsimon