Create a S3 bucket with the help of CloudFormation.
- Create a CloudFormation template that will create a S3 bucket named learn-cloudformation-$username. Replace $username with your username (e.g. awittig).
- Create a CloudFormation stack based on your template.
- Open
stub.yaml
with an editor of your choice. The stub file contains a skeleton to start from. - Add an
AWSTemplateFormatVersion
definition to your template (see Template anatomy). - Add a
Description
to your template (see Template anatomy). - Add a
Resources
section to your template (see Template anatomy). - Add a S3 bucket to the
Resources
section of your template (see Resource Type: S3 bucket). - Add
BucketName
as the only property to theProperties
section of the S3 bucket. Be careful: bucket name has to be globally unique. Trylearn-cloudformation-$username
replace$username
with your username.
- Open CloudFormation in AWS Management Console.
- Click Create Stack button.
- Select Upload a template to Amazon S3.
- Choose the template file you created for this lab.
- Click Next button.
- Insert
lab1-$username
as stack name. Replace$username
with your username (e.g. lab1-awittig). - Click Next button.
- Skip next step by clicking on Next button.
- Review your input and click Create button.
- Wait until your stack reaches status CREATE_COMPLETE.
- Select your stack by clicking on row of the table.
- Select Delete Stack from the Actions menu.
- Confirm the deletion of your stack.
- Congratulations! You are done with the lab!
This lab includes a sample solution sample-solution.yaml
. Use it if you are stuck during the creation of your template of if you want to review your results.