SlideShare a Scribd company logo
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Assembling an AWS CloudFormation
Authoring Tool Chain
D E V 3 6 8
Ryan Lohan
Software Dev Engineer
AWS CloudFormation
Chuck Meyer
Sr. Dev Advocate
AWS CloudFormation
Olivier Munn
Sr. Prod Manager
AWS CloudFormation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Setting up your IDE (VS Code)
Code completion
Validation (IDE/pre-commit)
Testing
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CloudFormation at a glance
Code in YAML or
JSON directly or use
sample templates
Upload local files
or from an Amazon
S3 bucket
Create stack
using console,
API or CLI
Stacks and
resources are
provisioned
Enables provisioning and management of your
infrastructure as code
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The challenge
If this is ”infrastructure as code” why are we still testing by continually
deploying and fixing failures?
Our goal: Catch errors early to reduce authoring time.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How you validate a template
aws cloudformation validate-template
Note
The aws cloudformation validate-template command is designed to
check only the syntax of your template. It does not ensure that the
property values that you have specified for a resource are valid for that
resource. Nor does it determine the number of resources that will exist
when the stack is created.
(https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-validate-template.html)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
But, we are living in a golden age of tools!
• cfn-lint
• Validate AWS CloudFormation yaml/json templates against the AWS CloudFormation spec
and additional checks
• cfn_nag
• Look for patterns in AWS CloudFormation templates that may indicate insecure
infrastructure.
• Taskcat
• Catch problems that aren’t obvious in a single template/stack
• Cloud Development Kit
• Define cloud infrastructure in code and provision it through AWS CloudFormation
• DSLs
• Troposphere/SparkleFormation/GoFormation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Code completion
• JSON Schema for AWS CloudFormation templates
• Code complete and IntelliSense
• In-place documentation links
• IDE integration (VSCode, PyCharm, etc.)
• Works for JSON and YAML templates
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Code completion
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Validation
• Validate syntax: cfn-lint
• Validate governance/business logic: cfn_nag
• IDE integration (cfn-lint)
• Pre-commit hook
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cfn-lint
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cfn-lint
https://github.com/awslabs/cfn-python-lint
pip install cfn-lint
cfn-lint –t simple-vpc.yaml
GitHub
306 Stars
290 PRs merged
153 Issues closed
61 Forks
Current release: v.0.9.1
Pypi
6,905 installs this week
23,232 installs this month
55,871 installs since release
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cfn-nag
• Validate governance/business logic: cfn_nag
• IAM rules that are too permissive (wildcards)
• Security group rules that are too permissive (wildcards)
• Access logs that aren't enabled
• Encryption that isn't enabled
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Testing – Taskcat
• Catch problems that aren’t obvious in a single template/stack
• TaskCat tests your templates by creating a stack in multiple AWS
Regions simultaneously
• Generates a report with a pass/fail grade for each region
https://docs.aws.amazon.com/quickstart/latest/cicd-taskcat
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Taskcat results
·[0;37;44m[taskcat]·[0m |GENERATING REPORTS·[1;41;0m
·[0;30;43m[INFO ]·[0m :Creating report in [taskcat_outputs]
·[0;30;43m[INFO ]·[0m :Collecting CloudFormation Logs
·[0;30;43m[INFO ]·[0m :Collecting logs for tCaT-tag-vpc-test-889778e5"
|StackName: tCaT-tag-vpc-test-889778e5
|Region: us-east-2
|Logging to: taskcat_outputs/tCaT-tag-vpc-test-889778e5-us-east-2-cfnlogs.txt
|Tested on: Wednesday, 31. October 2018 02:45PM
--------------------------------------------------------------------------------------
ResourceStatusReason:
Stack launch was successful
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Higher level languages
• Cloud Development Kit
• Author in TypeScript
• L2 constructs
• Simplify definitions using
abstractions
• Domain specific languages
• Write in a familiar language
• Troposphere (Python)
• SparkleFormation (Ruby)
• GOFormation (Golang)
• …
• Maps closely to AWS CloudFormation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CDK (Cloud Development Kit) in dev preview
CDK application
Stack(s)
Construct(s)
CDK
CLI
AWS CloudFormation
Templates“compiler”
“assembly
language”
“processor”
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CDK
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tools we mentioned
cfn-lint https://git.io/vhGFK
cfn_nag https://git.io/fpe1K
taskcat https://git.io/fpe1X
CDK https://git.io/fpcjh
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Amazon Web Services
 
Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...
Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...
Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...
Amazon Web Services
 
Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018
Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018
Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018
Amazon Web Services
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
Amazon Web Services
 
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Amazon Web Services
 
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Amazon Web Services
 
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Amazon Web Services
 
Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...
Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...
Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...
Amazon Web Services
 
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
Amazon Web Services
 
Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...
Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...
Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...
Amazon Web Services
 
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Amazon Web Services
 
Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018
Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018
Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018
Amazon Web Services
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
Amazon Web Services
 
Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018
Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018
Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018
Amazon Web Services
 
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Amazon Web Services
 
Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...
Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...
Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...
Amazon Web Services
 
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Amazon Web Services
 
Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...
Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...
Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...
Amazon Web Services
 
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
Amazon Web Services
 
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
Amazon Web Services
 

What's hot (20)

Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
 
Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...
Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...
Building the Technical Foundation for Your Security Practice (GPSCT205) - AWS...
 
Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018
Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018
Addressing Your Business Needs with AWS (ARC323) - AWS re:Invent 2018
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
 
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
 
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
 
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
 
Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...
Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...
Migrate Microsoft Applications to AWS like an Expert (WIN301) - AWS re:Invent...
 
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
 
Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...
Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...
Deploy and Scale a Cloud Application with Amazon Lightsail (CMP410-R2) - AWS ...
 
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
 
Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018
Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018
Getting Started with AWS Greengrass (IOT215-R3) - AWS re:Invent 2018
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
 
Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018
Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018
Deep Dive on AWS CloudHSM (SEC358-R1) - AWS re:Invent 2018
 
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
 
Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...
Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...
Best Practices for Implementing Mobile & Web App Testing in the Cloud (MOB205...
 
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
 
Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...
Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...
Optimize Your Oracle Licenses on Amazon Web Services (DAT211) - AWS re:Invent...
 
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
 
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
 

Similar to Assembling an AWS CloudFormation Authoring Tool Chain (DEV368-R2) - AWS re:Invent 2018

Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Amazon Web Services
 
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
Cobus Bernard
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Amazon Web Services
 
SRV313 Introduction to Building Web Apps on AWS
 SRV313 Introduction to Building Web Apps on AWS SRV313 Introduction to Building Web Apps on AWS
SRV313 Introduction to Building Web Apps on AWS
Amazon Web Services
 
saa3_wk5.pdf
saa3_wk5.pdfsaa3_wk5.pdf
saa3_wk5.pdf
Michgo1
 
Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...
Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...
Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...
Amazon Web Services
 
Harness the Power of Infrastructure as Code
Harness the Power of Infrastructure as CodeHarness the Power of Infrastructure as Code
Harness the Power of Infrastructure as Code
Amazon Web Services
 
Devops on serverless
Devops on serverlessDevops on serverless
Devops on serverless
Sébastien ☁ Stormacq
 
DevSecOps 的規模化實踐 (Level: 300-400)
DevSecOps 的規模化實踐 (Level: 300-400)DevSecOps 的規模化實踐 (Level: 300-400)
DevSecOps 的規模化實踐 (Level: 300-400)
Amazon Web Services
 
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
Kim Kao
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
Amazon Web Services
 
How to Determine if You Are Well-Architected for Reliability
How to Determine if You Are Well-Architected for ReliabilityHow to Determine if You Are Well-Architected for Reliability
How to Determine if You Are Well-Architected for ReliabilityAmazon Web Services
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
Amazon Web Services
 
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Amazon Web Services
 
Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...
Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...
Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...
Amazon Web Services
 
Deep Dive on AWS CloudFormation
Deep Dive on AWS CloudFormationDeep Dive on AWS CloudFormation
Deep Dive on AWS CloudFormation
Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...Amazon Web Services
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
Chris Munns
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
DevOps.com
 

Similar to Assembling an AWS CloudFormation Authoring Tool Chain (DEV368-R2) - AWS re:Invent 2018 (20)

Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
 
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
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
 
SRV313 Introduction to Building Web Apps on AWS
 SRV313 Introduction to Building Web Apps on AWS SRV313 Introduction to Building Web Apps on AWS
SRV313 Introduction to Building Web Apps on AWS
 
saa3_wk5.pdf
saa3_wk5.pdfsaa3_wk5.pdf
saa3_wk5.pdf
 
Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...
Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...
Control for Your Cloud Environment Using AWS Management Tools (ENT226-R1) - A...
 
Harness the Power of Infrastructure as Code
Harness the Power of Infrastructure as CodeHarness the Power of Infrastructure as Code
Harness the Power of Infrastructure as Code
 
Devops on serverless
Devops on serverlessDevops on serverless
Devops on serverless
 
DevSecOps 的規模化實踐 (Level: 300-400)
DevSecOps 的規模化實踐 (Level: 300-400)DevSecOps 的規模化實踐 (Level: 300-400)
DevSecOps 的規模化實踐 (Level: 300-400)
 
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
How to Determine if You Are Well-Architected for Reliability
How to Determine if You Are Well-Architected for ReliabilityHow to Determine if You Are Well-Architected for Reliability
How to Determine if You Are Well-Architected for Reliability
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
 
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
 
Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...
Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...
Hands-On with Advanced AWS CloudFormation Techniques and New Features (DEV335...
 
Deep Dive on AWS CloudFormation
Deep Dive on AWS CloudFormationDeep Dive on AWS CloudFormation
Deep Dive on AWS CloudFormation
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
 

More from Amazon Web Services

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...
Amazon Web Services
 
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...
Amazon Web Services
 
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
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon Web Services
 
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
Amazon Web Services
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
Amazon Web Services
 
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...
Amazon Web Services
 
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...
Amazon Web Services
 
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
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon Web Services
 
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
Amazon Web Services
 
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
Amazon Web Services
 
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
Amazon Web Services
 
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
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 AWSAmazon 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 DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon 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
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
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...
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 

Assembling an AWS CloudFormation Authoring Tool Chain (DEV368-R2) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Assembling an AWS CloudFormation Authoring Tool Chain D E V 3 6 8 Ryan Lohan Software Dev Engineer AWS CloudFormation Chuck Meyer Sr. Dev Advocate AWS CloudFormation Olivier Munn Sr. Prod Manager AWS CloudFormation
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Setting up your IDE (VS Code) Code completion Validation (IDE/pre-commit) Testing
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CloudFormation at a glance Code in YAML or JSON directly or use sample templates Upload local files or from an Amazon S3 bucket Create stack using console, API or CLI Stacks and resources are provisioned Enables provisioning and management of your infrastructure as code
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. The challenge If this is ”infrastructure as code” why are we still testing by continually deploying and fixing failures? Our goal: Catch errors early to reduce authoring time.
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How you validate a template aws cloudformation validate-template Note The aws cloudformation validate-template command is designed to check only the syntax of your template. It does not ensure that the property values that you have specified for a resource are valid for that resource. Nor does it determine the number of resources that will exist when the stack is created. (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-validate-template.html)
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. But, we are living in a golden age of tools! • cfn-lint • Validate AWS CloudFormation yaml/json templates against the AWS CloudFormation spec and additional checks • cfn_nag • Look for patterns in AWS CloudFormation templates that may indicate insecure infrastructure. • Taskcat • Catch problems that aren’t obvious in a single template/stack • Cloud Development Kit • Define cloud infrastructure in code and provision it through AWS CloudFormation • DSLs • Troposphere/SparkleFormation/GoFormation
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Code completion • JSON Schema for AWS CloudFormation templates • Code complete and IntelliSense • In-place documentation links • IDE integration (VSCode, PyCharm, etc.) • Works for JSON and YAML templates
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Code completion
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Validation • Validate syntax: cfn-lint • Validate governance/business logic: cfn_nag • IDE integration (cfn-lint) • Pre-commit hook
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cfn-lint
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cfn-lint https://github.com/awslabs/cfn-python-lint pip install cfn-lint cfn-lint –t simple-vpc.yaml GitHub 306 Stars 290 PRs merged 153 Issues closed 61 Forks Current release: v.0.9.1 Pypi 6,905 installs this week 23,232 installs this month 55,871 installs since release
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cfn-nag • Validate governance/business logic: cfn_nag • IAM rules that are too permissive (wildcards) • Security group rules that are too permissive (wildcards) • Access logs that aren't enabled • Encryption that isn't enabled
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Testing – Taskcat • Catch problems that aren’t obvious in a single template/stack • TaskCat tests your templates by creating a stack in multiple AWS Regions simultaneously • Generates a report with a pass/fail grade for each region https://docs.aws.amazon.com/quickstart/latest/cicd-taskcat
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Taskcat results ·[0;37;44m[taskcat]·[0m |GENERATING REPORTS·[1;41;0m ·[0;30;43m[INFO ]·[0m :Creating report in [taskcat_outputs] ·[0;30;43m[INFO ]·[0m :Collecting CloudFormation Logs ·[0;30;43m[INFO ]·[0m :Collecting logs for tCaT-tag-vpc-test-889778e5" |StackName: tCaT-tag-vpc-test-889778e5 |Region: us-east-2 |Logging to: taskcat_outputs/tCaT-tag-vpc-test-889778e5-us-east-2-cfnlogs.txt |Tested on: Wednesday, 31. October 2018 02:45PM -------------------------------------------------------------------------------------- ResourceStatusReason: Stack launch was successful
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Higher level languages • Cloud Development Kit • Author in TypeScript • L2 constructs • Simplify definitions using abstractions • Domain specific languages • Write in a familiar language • Troposphere (Python) • SparkleFormation (Ruby) • GOFormation (Golang) • … • Maps closely to AWS CloudFormation
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CDK (Cloud Development Kit) in dev preview CDK application Stack(s) Construct(s) CDK CLI AWS CloudFormation Templates“compiler” “assembly language” “processor”
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CDK
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tools we mentioned cfn-lint https://git.io/vhGFK cfn_nag https://git.io/fpe1K taskcat https://git.io/fpe1X CDK https://git.io/fpcjh
  • 24. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.