Many AWS customers have adopted a DevOps model for faster and more reliable software delivery. Applying software engineering best practices such as revision control and continuous delivery to your infrastructure is essential for adopting DevOps. In this session, find out how CloudFormation and associated AWS tools allow you to leverage a DevOps model by treating infrastructure as code and applying software engineering best practices to your AWS infrastructure.
2. You are on-board …
needs to experiment, innovate, reduce
risk
Business
of services and applications
Continuous
Delivery
culture, automation, measurement,
sharing
DevOps
infrastructure-as-code
Cloud
4. AWS CloudFormation
• Create templates of the infrastructure and
applications you want to run on AWS
• Have the CloudFormation service
automatically provision the required AWS
resources and their relationships from the
templates
• Easily version control, replicate or update
the infrastructure and applications using
the templates
• Integrates with other development, CI/CD,
and management tools.
6. depends on
Design -
Imagine building a food ordering service
Food Catalog
Website
Ordering Website
Customer DB
Service
Inventory Service
Recommendations
Service
Analytics Service Fulfillment
Service
Payment
Service
7. Create template –
For example, for the food catalog website
security group
Auto Scaling group
EC2
instance
Elastic Load
Balancing
Customer DB
Service
Inventory Service
Recommendations
Service
ElastiCache
memcached cluster
Software pkgs,
config, & dataCloudWatch
alarms
23. Extend with Custom Resources
security group
Auto Scaling group
EC2
instance
Elastic Load
Balancing
ElastiCache
memcached cluster
Software pkgs,
config, & dataCloudWatch
alarms
Web Analytics
Service
AWS
CloudFormation
Provision
AWS Resources
"Resources" : {
"WebAnalyticsTrackingID" : {
"Type" : "Custom::WebAnalyticsService::TrackingID",
"Properties" : {
"ServiceToken" : "arn:aws:sns:...",
"Target" : {"Fn::GetAtt" : ["LoadBalancer", "DNSName"]},
"Plan" : "Gold"
}
},
...
“Success” + Metadata
“Create, Update, Rollback, or Delete”
+ Metadata
24. Lambda-backed custom resources
security group
Auto Scaling group
EC2
instance
Elastic Load
Balancing
ElastiCache
memcached cluster
Software pkgs,
config, & dataCloudWatch
alarms
Your AWS CloudFormation stack
// Implement custom logic here
Look up an AMI ID
Your AWS Lambda functions
Look up VPC ID and Subnet ID
Reverse an IP address
Lambda-powered
custom resources
42. CloudFormation in a CI/CD pipeline
AWS
CloudFormationIssue Tracker
App Developers
DevOps Engineers,
Infrastructure Developers,
Systems Engineers
Dev Env Code Repo
App Pkgs,
CloudFormation
Templates, Etc.
CI Server
Test
Staging
ProdCode Review
"Infra-as-Code"
App Code
& Templates
44. CloudFormer: Templatize existing resources
1. Launch a CloudFormer
application stack
2. Walkthrough the
CloudFormer UI & select
resources to templatize
4. Customize
Example: parameterize
resource properties
5. Create a new stack
45. Practitioners of infrastructure-as-code
• Developers/DevOps teams value CloudFormation for its ability to
treat infrastructure as code, allowing them to apply software
engineering principles, such as SOA, revision control, code reviews,
integration testing to infrastructure.
• IT Admins and MSPs value CloudFormation as a platform to enable
standardization, managed consumption, and role-specialization.
• ISVs value CloudFormation for its ability to support scaling out of
multi-tenant SaaS products by quickly replicating or updating stacks.
ISVs also value CloudFormation as a way to package and deploy
their software in their customer accounts on AWS.