SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
An evening
with AWS CloudFormation
Julien Simon
Principal Technical Evangelist, AWS
@aws_actus @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, integration, 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 J
•  Read sample templates
•  Use AWS CloudFormer as a starting point
•  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!
Let’s summon the clouds!
Demo gods, I’m your humble servant,
please be good to me
Create, update, delete a basic stack
Create a VPC with 4 subnets
Create A LAMP stack
Create an app in Elastic Beanstalk and look
at the template
Create an ECS cluster and look at the
template
@aws_actus @julsimon
www.facebook.com/groups/AWSFrance/
AWS User Groups in Paris,
Lyon, Nantes, Lille & Rennes
(meetup.com)
March 7-8
AWS Summit
May 31st
April 20-22March 23-24 April 6-7 (Lyon)
April 25
aws.amazon.com/fr/awsomeday/
BONUS SLIDES
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
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

Contenu connexe

Tendances

Tendances (20)

Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.js
 
Workshop AWS IoT @ SIDO
Workshop AWS IoT @ SIDOWorkshop AWS IoT @ SIDO
Workshop AWS IoT @ SIDO
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
Building a Serverless Pipeline
Building a Serverless PipelineBuilding a Serverless Pipeline
Building a Serverless Pipeline
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic Beanstalk
 
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 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
 
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows ServerAWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
 
Hands-on with AWS IoT
Hands-on with AWS IoTHands-on with AWS IoT
Hands-on with AWS IoT
 
Continuous Deployment with Amazon Web Services
Continuous Deployment with Amazon Web ServicesContinuous Deployment with Amazon Web Services
Continuous Deployment with Amazon Web Services
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic Beanstalk
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWS
 
Using Amazon CloudWatch Events, AWS Lambda and Spark Streaming to Process EC...
 Using Amazon CloudWatch Events, AWS Lambda and Spark Streaming to Process EC... Using Amazon CloudWatch Events, AWS Lambda and Spark Streaming to Process EC...
Using Amazon CloudWatch Events, AWS Lambda and Spark Streaming to Process EC...
 
Building a data warehouse with Amazon Redshift … and a quick look at Amazon ...
Building a data warehouse  with Amazon Redshift … and a quick look at Amazon ...Building a data warehouse  with Amazon Redshift … and a quick look at Amazon ...
Building a data warehouse with Amazon Redshift … and a quick look at Amazon ...
 
Introduction to Amazon Lightsail
Introduction to Amazon LightsailIntroduction to Amazon Lightsail
Introduction to Amazon Lightsail
 
Serverless architecture with AWS Lambda (June 2016)
Serverless architecture with AWS Lambda (June 2016)Serverless architecture with AWS Lambda (June 2016)
Serverless architecture with AWS Lambda (June 2016)
 
Serverless architectures on aws
Serverless architectures on awsServerless architectures on aws
Serverless architectures on aws
 
Introduction to AWS Batch
Introduction to AWS BatchIntroduction to AWS Batch
Introduction to AWS Batch
 
AWS Big Data combo
AWS Big Data comboAWS Big Data combo
AWS Big Data combo
 
Docker on AWS
Docker on AWSDocker on AWS
Docker on AWS
 

En vedette

(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS
Amazon Web Services
 

En vedette (16)

AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
Amazon Redshift (February 2016)
Amazon Redshift (February 2016)Amazon Redshift (February 2016)
Amazon Redshift (February 2016)
 
The Lost Tales of Platform Design (February 2017)
The Lost Tales of Platform Design (February 2017)The Lost Tales of Platform Design (February 2017)
The Lost Tales of Platform Design (February 2017)
 
AWS CodeDeploy: Manage Deployment Complexity
AWS CodeDeploy: Manage Deployment ComplexityAWS CodeDeploy: Manage Deployment Complexity
AWS CodeDeploy: Manage Deployment Complexity
 
Deep Dive into Amazon ElastiCache Architecture and Design Patterns (DAT307) |...
Deep Dive into Amazon ElastiCache Architecture and Design Patterns (DAT307) |...Deep Dive into Amazon ElastiCache Architecture and Design Patterns (DAT307) |...
Deep Dive into Amazon ElastiCache Architecture and Design Patterns (DAT307) |...
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Workshop AWS IoT @ IoT World Paris
Workshop AWS IoT @ IoT World ParisWorkshop AWS IoT @ IoT World Paris
Workshop AWS IoT @ IoT World Paris
 
Availability & Scalability with Elastic Load Balancing & Route 53 (CPN204) | ...
Availability & Scalability with Elastic Load Balancing & Route 53 (CPN204) | ...Availability & Scalability with Elastic Load Balancing & Route 53 (CPN204) | ...
Availability & Scalability with Elastic Load Balancing & Route 53 (CPN204) | ...
 
Keynote @ IoT World Paris
Keynote @ IoT World ParisKeynote @ IoT World Paris
Keynote @ IoT World Paris
 
Deep Dive - Infrastructure as Code
Deep Dive - Infrastructure as CodeDeep Dive - Infrastructure as Code
Deep Dive - Infrastructure as Code
 
Aws multi-region High Availability
Aws multi-region High Availability Aws multi-region High Availability
Aws multi-region High Availability
 
(SDD408) Amazon Route 53 Deep Dive: Delivering Resiliency, Minimizing Latency...
(SDD408) Amazon Route 53 Deep Dive: Delivering Resiliency, Minimizing Latency...(SDD408) Amazon Route 53 Deep Dive: Delivering Resiliency, Minimizing Latency...
(SDD408) Amazon Route 53 Deep Dive: Delivering Resiliency, Minimizing Latency...
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS
 
AWS CloudFormation Masterclass
AWS CloudFormation MasterclassAWS CloudFormation Masterclass
AWS CloudFormation Masterclass
 
Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)
 

Similaire à AWS CloudFormation (February 2016)

Similaire à AWS CloudFormation (February 2016) (20)

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
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
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
 
(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS 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
 
Cloud Formation
Cloud FormationCloud Formation
Cloud Formation
 
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic BeanstalkDeploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
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)
 
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 with Amazon Web Services
Infrastructure as code with Amazon Web ServicesInfrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web Services
 
The AWS DevOps combo (January 2017)
The AWS DevOps combo (January 2017)The AWS DevOps combo (January 2017)
The AWS DevOps combo (January 2017)
 
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
 
Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormation
 
Architecting for the Cloud: Best Practices
Architecting for the Cloud: Best PracticesArchitecting for the Cloud: Best Practices
Architecting for the Cloud: Best Practices
 
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh VariaAWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
 
Dallas Breakfast Seminar
Dallas Breakfast SeminarDallas Breakfast Seminar
Dallas Breakfast Seminar
 
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
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormation
 
Infrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormationInfrastructure Continuous Delivery Using AWS CloudFormation
Infrastructure Continuous Delivery Using AWS CloudFormation
 

Plus de Julien SIMON

Plus de 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)
 

Dernier

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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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...
 
"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 ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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, ...
 
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
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

AWS CloudFormation (February 2016)

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. An evening with AWS CloudFormation Julien Simon Principal Technical Evangelist, AWS @aws_actus @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, integration, 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 J •  Read sample templates •  Use AWS CloudFormer as a starting point •  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!
  • 15. Let’s summon the clouds! Demo gods, I’m your humble servant, please be good to me Create, update, delete a basic stack Create a VPC with 4 subnets Create A LAMP stack Create an app in Elastic Beanstalk and look at the template Create an ECS cluster and look at the template
  • 16. @aws_actus @julsimon www.facebook.com/groups/AWSFrance/ AWS User Groups in Paris, Lyon, Nantes, Lille & Rennes (meetup.com) March 7-8 AWS Summit May 31st April 20-22March 23-24 April 6-7 (Lyon) April 25 aws.amazon.com/fr/awsomeday/
  • 18. 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
  • 19. 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
  • 20. 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