SlideShare a Scribd company logo
Infrastructure as code
with
AWS CloudFormation
PyMunich 2016
Justyna Janczyszyn (JJ)
@JJanczyszyn
software engineer at 10Clouds
Infrastructure as Code with AWS CloudFormation
CHALLENGES
4 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
5 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
6 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
7 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
8 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
9 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Image taken from: Infrastructure as Code by Kief Morris
10 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
11 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as code principles
and practices to the rescue!
12 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Any element of infrastructure
should be easily reproducible
13 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Systems should be
consistent
14 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Processes should be
repeatable
15 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Design is always changing
16 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Practices
17 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• Use Definition files
• Self-documented systems and processes
• Version all the things
• Continuously test the systems and processes
• Small changes rather than batches
• Services available continuously
Infrastructure as Code by Kief Morris
CloudFormation
18 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
19 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
20 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Image taken from http://fbrnc.net/blog/2016/05/green-blue-deployments-with-aws-lambda-and-cloudformation
Creating a stack
21 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
aws cloudformation create-stack
--stack-name demo-iac
--template-body file://Template.yaml
--parameters file://Params.json
--capabilities CAPABILITY_NAMED_IAM
--region eu-west-1;
Infrastructure as Code with AWS CloudFormation
23 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
24 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
25 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
26 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
aws cloudformation describe-stacks --stack-name demo-iac
Describe a stack
Infrastructure as Code with AWS CloudFormation
Delete a stack
28 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
aws cloudformation delete-stack —stack-name demo-iac
Change Sets
29 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
https://aws.amazon.com/blogs/aws/new-change-sets-for-aws-
cloudformation/
https://aws.amazon.com/blogs/aws/new-change-sets-for-aws-cloudformation/
aws cloudformation estimate-template-cost
--template-body file://Template.yaml
--parameters file://Params.json;
31 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Cost estimation
32 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
33 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Best Practices
34 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Planning and organizing
• organize stacks by lifecycle and ownership
• reuse templetes for various environments
• use nested stacks
35 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Creating templates
• don’t embed credentials in templates
• validate templates before using them
• use parameter constraints
36 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Managing stacks
• use stack policies
• use change sets
• manage all stack resources through cloudformation
• use code reviews and revision for your templates
Ready to use templates
37 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• https://github.com/awslabs/aws-cloudformation-
templates
• https://github.com/widdix/aws-cf-templates
Library to create AWS
CloudFormation descriptions
38 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• https://github.com/cloudtools/troposphere
Other resources
39 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• Infrastructure as Code by Kief Morris
http://infrastructure-as-code.com/
• Martin Fowler’s Infrastructure as Code at YOW! 2016:
https://www.youtube.com/watch?v=ueAef9tNUck
http://martinfowler.com/bliki/InfrastructureAsCode.html
• Great blog on AWS:
https://cloudonaut.io/
Step by step automate all
40 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code

More Related Content

PDF
Using Docker, Neo4j, and Spring Cloud for Developing Microservices
PDF
Using Docker, Neo4j, and Spring Cloud for Developing Microservices
PDF
Devops stack
PDF
Scaling Django to the sky
PPTX
Journey into Continuous Glucose Monitoring Technology as a Parent
PDF
CI&CD on AWS - Meetup Roma Oct 2016
PPTX
Aws tools cicd
PPTX
Scaling Up Continuous Deployment
Using Docker, Neo4j, and Spring Cloud for Developing Microservices
Using Docker, Neo4j, and Spring Cloud for Developing Microservices
Devops stack
Scaling Django to the sky
Journey into Continuous Glucose Monitoring Technology as a Parent
CI&CD on AWS - Meetup Roma Oct 2016
Aws tools cicd
Scaling Up Continuous Deployment

Viewers also liked (18)

PPTX
Continuous Delivery in the AWS Cloud
PPTX
Analysis of TLS in SMTP World
PPTX
The Hard Problems of Continuous Deployment
PDF
Infrastructure Continuous Delivery using CloudFormation
PPTX
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
PPTX
Keeping your CI/CD pipeline as fast as it needs to be
PDF
Continuous Deployment: Beyond Continuous Delivery
PDF
Dod is not done
PDF
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
PDF
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
PDF
Continuous Deployment: The Dirty Details
PDF
The Journey of devops and continuous delivery in a Large Financial Institution
PDF
Securing application deployments in multi-tenant CI/CD environments
PDF
A brief introduction to CloudFormation
ZIP
Continuous Integration, Build Pipelines and Continuous Deployment
PPTX
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
PDF
CI/CD with Docker on AWS
PDF
DevOps and AWS
Continuous Delivery in the AWS Cloud
Analysis of TLS in SMTP World
The Hard Problems of Continuous Deployment
Infrastructure Continuous Delivery using CloudFormation
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
Keeping your CI/CD pipeline as fast as it needs to be
Continuous Deployment: Beyond Continuous Delivery
Dod is not done
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Continuous Deployment: The Dirty Details
The Journey of devops and continuous delivery in a Large Financial Institution
Securing application deployments in multi-tenant CI/CD environments
A brief introduction to CloudFormation
Continuous Integration, Build Pipelines and Continuous Deployment
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
CI/CD with Docker on AWS
DevOps and AWS
Ad

Similar to Infrastructure as Code with AWS CloudFormation (20)

PDF
Infrastructure as Code 2nd Edition Early Access Kief Morris
PDF
Infrastructure as Code 2nd Edition Early Access Kief Morris
PDF
Infrastructure as Code 2nd Edition Early Access Kief Morris
PDF
Infrastructure as Code 2nd Edition Early Access Kief Morris all chapter inst...
PDF
Clean Infrastructure as Code
PDF
Infrastructure-As-A/From-Code - An Introduction
PDF
Infrastructure as code managing servers in the cloud Morris 2024 scribd download
PDF
DevOps Fest 2020. immutable infrastructure as code. True story.
PDF
Patterns And Practices For Infrastructure As Code With Examples In Python And...
PDF
Best Practices of Infrastructure as Code with Terraform
PDF
Infrastructure as code managing servers in the cloud Morris
PDF
Infrastructure as code managing servers in the cloud Morris
PDF
Agiles Peru 2019 - Infrastructure As Code
PDF
Infraestructura como Codigo para Developers
PDF
Meta Infrastructure as Code: How Capital One Automated Our Automation Tools w...
PDF
Why modern cloud infrastructure require automation
PPTX
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
PDF
AWS CDK introduction
PPTX
Infrastructure as Code
PDF
Inrastructure as Code
Infrastructure as Code 2nd Edition Early Access Kief Morris
Infrastructure as Code 2nd Edition Early Access Kief Morris
Infrastructure as Code 2nd Edition Early Access Kief Morris
Infrastructure as Code 2nd Edition Early Access Kief Morris all chapter inst...
Clean Infrastructure as Code
Infrastructure-As-A/From-Code - An Introduction
Infrastructure as code managing servers in the cloud Morris 2024 scribd download
DevOps Fest 2020. immutable infrastructure as code. True story.
Patterns And Practices For Infrastructure As Code With Examples In Python And...
Best Practices of Infrastructure as Code with Terraform
Infrastructure as code managing servers in the cloud Morris
Infrastructure as code managing servers in the cloud Morris
Agiles Peru 2019 - Infrastructure As Code
Infraestructura como Codigo para Developers
Meta Infrastructure as Code: How Capital One Automated Our Automation Tools w...
Why modern cloud infrastructure require automation
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
AWS CDK introduction
Infrastructure as Code
Inrastructure as Code
Ad

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
Dropbox Q2 2025 Financial Results & Investor Presentation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Advanced Soft Computing BINUS July 2025.pdf

Infrastructure as Code with AWS CloudFormation