Deploying CloudFormation stacks at scale
Automation and efficiency
Scalability and agility
Version control and collaboration
Consistency and reproducibility
Auditing and compliance
AWS IaC service that lets us write IaC in plain texts like json or yaml
of CloudFormation
--- AWSTemplateFormatVersion: "2010-09-09" Resources: FirstEc2Instance: Type: "AWS::EC2::Instance" Properties: InstanceType: "t2.micro" ImageId: "ami-0c55b159cbfafe1f0"
➜ aws cloudformation create-stack --stack-name "first-cfn-stack"
➜ aws cloudformation create-stack --stack-name "first-cfn-stack"
➜ aws cloudformation create-stack --stack-name "second-cfn-stack"
➜ aws cloudformation create-stack --stack-name "third-cfn-stack"
➜ aws cloudformation create-stack --stack-name "fourth-cfn-stack"
➜ aws cloudformation create-stack --stack-name "fourth-cfn-stack"
➜ aws cloudformation create-stack --stack-name "fifth-cfn-stack"
create-db:
aws cloudformation create-stack --stack-name "db-stack" ...
create-cache:
aws cloudformation create-stack --stack-name "cache-stack" ...
create-api: create-db create-cache
aws cloudformation create-stack --stack-name "third-cfn-stack" ...
create-app: create-api
@echo "App Successfully Created!!"
#!/bin/bash
echo 'CREATE DATABASE'
make create-db
echo 'CREATE CACHE'
make create-cache
echo 'WAITING.. DATABASE & CACHE'
make wait-create-cache
make wait-create-db
echo 'CREATE API'
make create-api
make wait-create-api
echo 'APP SUCCESSFULLY CREATED'
#compose
services:
db:
path: db
cache:
path: cache
api:
path: api
dependsOn:
- db
- cache
AWS_MAX_ATTEMPTS
AWS_RETRY_MODE
With Great Automation Comes Great Responsibility