Infrastructure as Code with
Troposphere on AWS
Mathias Mårtens
AWS CloudFormation
● Provision and update AWS resources
● Manage dependencies of AWS resources
● Runtime parameters
● References
● Flow control
● json, yaml
Limitations
● Growing organisation
● Amount of micro services
Complexity
● Nested Stacks
● Templates reuse
● Coupled DNS
● Naming
● Tagging
Troposphere
● Python code to describe the AWS resources
● ~1-to-1 mapping to CFN
● Built in property and type checking
● Generates CFN json, no provisioning
● Easier to get started with than CFN
● Easier to do code reviews
Extended Template Class
Naming
Metadata
Tooling
Cross Stack References
AWS Resources
Metadata
Dependencies
Conformity
Naming
Tags
Logging
Alarm
Metrics
Decouple DNS
Blue/Green deploy
Infrastructure migration
Generate & Version Control
Testing
● Golden file testing
● 100% test coverage
Wrap-up
● Build for change
● Version control infrastructure
● Don’t mix IaC and manual config
● Build to handle failures in a
controlled way
● Hide complexity where it is easy to
test
Learn more
More about Viaplay: https://viaplay.se/jobs
Troposphere on github: https://github.com/cloudtools/troposphere
See a longer version of this talk done by my colleague Nils:
https://www.youtube.com/watch?v=IRHoT07sV1E

Infrastructure as code with troposphere on aws in 5 min