On Github gianarb / aws-under-the-hood
cit. Wikipedia
AWS CloudFormation gives developers and systems administrators an easy way to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion.
Template
it is a JSON formatted file. It describes PARAMTERS, RESOURCES and ACTION
Stack
When you use AWS CloudFormation, you manage related resources as a single unit called a stack.
you can generate a change set, which is summary of your proposed changes.
versioning, update, delete fast
{ "Parameters" : { "VPCName" : { "Type" : "String", "Default" : "staging", "Description" : "VPC name" } }, "Resources" : { "Staging": { "Type" : "AWS::EC2::VPC", "Properties" : { "CidrBlock" : "10.15.0.0/16", "EnableDnsSupport" : true, "EnableDnsHostnames" : true, "InstanceTenancy" : "default", "Tags" : [{"Key": "Name", "Value": {"Ref": "VPCName"}}] } } } }Princial chapters, RESOURCES and PARAMETERS, connection between them (VPCName)
{ "Resources" : { "Staging": { "Type" : "AWS::EC2::VPC", "Properties" : { "CidrBlock" : "10.15.0.0/16", "EnableDnsSupport" : true, "EnableDnsHostnames" : true, "InstanceTenancy" : "default", "Tags" : [{"Key": "Name", "Value": {"Ref": "VPCName"}}] } }, "DatabaseSubnet1": { "Type" : "AWS::EC2::Subnet", "Properties" : { "AvailabilityZone" : "eu-west-1a", "CidrBlock" : "10.15.1.0/28", "MapPublicIpOnLaunch" : true, "VpcId": {"Ref" : "Staging"}, "Tags": [{"Key": "Name", "Value": "db-1a"}] } } } }Connections between resources, in this case Subnet1 and Staging like VPC. This could be also an example of update.
aws cloudformation create-stack --stack-name devops_stage --template-body file:///home/gianarb/devops.json --parameters VPCName=staging,AppName=testYou can do anything with the CLI, it allows you to integrate this technology in your CI or delivery system