aws cloudformation hello world
Cloudformation is quite cool and this is an example of how to do a simple s3 bucket creations.
The resources followed by MyS3Bucket (this can be any meaningful name). Type is mandatory and it has to be pre-defined and we're creating a s3 bucket. As for the properties, it has to be references from the documentation.
And then we have outputs - where we can see what the ARN and websiteURL for our s3 bucket. Notice that this doesn't allow you to shared with other resources.
To make it shareable to other resources, we simply add Export, as seen here:-
To create this stack, simply run
aws cloudformation create-stack --stack-name lambda-store --template-body file://store.yaml --capabilities CAPABILITY_NAMED_IAM --region ap-southeast-2
And then once you've created it, you can see we have the outputs and exports.
Repository link here:-
https://github.com/kepungnzai/cloudformation-helloworld
Comments