Skip to content

Latest commit

 

History

History
 
 

lab01-simple-template

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Lab 1: Simple template

Create a S3 bucket with the help of CloudFormation.

Overview

  1. Create a CloudFormation template that will create a S3 bucket named learn-cloudformation-$username. Replace $username with your username (e.g. awittig).
  2. Create a CloudFormation stack based on your template.

Instructions

Create a template

  1. Open stub.yaml with an editor of your choice. The stub file contains a skeleton to start from.
  2. Add an AWSTemplateFormatVersion definition to your template (see Template anatomy).
  3. Add a Description to your template (see Template anatomy).
  4. Add a Resources section to your template (see Template anatomy).
  5. Add a S3 bucket to the Resources section of your template (see Resource Type: S3 bucket).
  6. Add BucketName as the only property to the Properties section of the S3 bucket. Be careful: bucket name has to be globally unique. Try learn-cloudformation-$username replace $username with your username.

Create a stack based on the template (Management Console)

  1. Open CloudFormation in AWS Management Console.
  2. Click Create Stack button.
  3. Select Upload a template to Amazon S3.
  4. Choose the template file you created for this lab.
  5. Click Next button.
  6. Insert lab1-$username as stack name. Replace $usernamewith your username (e.g. lab1-awittig).
  7. Click Next button.
  8. Skip next step by clicking on Next button.
  9. Review your input and click Create button.
  10. Wait until your stack reaches status CREATE_COMPLETE.
  11. Select your stack by clicking on row of the table.
  12. Select Delete Stack from the Actions menu.
  13. Confirm the deletion of your stack.
  14. Congratulations! You are done with the lab!

Create a stack based on the template (CLI)

Documentation

Sample solution

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.