Introduction to AWS CloudFormation
Infrastructure as code (IaC) service that helps you model and set up your AWS resources.
AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS.
Creating your first stack
In your favorite IDE create a YML file as shown below, but you may use JSON formatting if you wish.
Is a good idea to install one of the Cloudformation plug-ins avilable, I’m using Visual Studio Code :-).
bucket.yml
AWSTemplateFormatVersion: "2010-09-09"
Description: This is my first bucket
Resources:
MyBucket:
Type: AWS::S3::Bucket
This simple template will create a bucket, for that purpose we use the awscli.
If you don´t have the awscli installed please refer to this guide.
$ aws cloudformation create-stack \
--stack-name mybucket\
--template-body file://bucket.yml