Skip to content
Paul Duvall edited this page Oct 25, 2019 · 10 revisions

1.2 Access the CloudFormation console

Review and ensure that you have setup your development environment before going through the steps below.

Create a new CloudFormation template

From your AWS Cloud9 terminal, create a new directory and then a new file.

cd ~/environment/ccoa
touch ccoa-1-cfn.yml

Open the ccoa-1-cfn.yml file and paste the contents below and save the file:

---
AWSTemplateFormatVersion: '2010-09-09'
Description: This template creates one or more Amazon resources. 
  You will be billed for AWS resources used if you create a stack
Resources:
  MyQueue:
    Type: AWS::SQS::Queue
    Properties:
      QueueName:
        Fn::Join:
        - ''
        - - SampleQueue-
          - Ref: AWS::StackName
Outputs:
  SourceQueueARN: 
    Description: "ARN of source queue"
    Value: 
      Fn::GetAtt: 
        - "MyQueue"
        - "Arn"

Launch CloudFormation Stack from Console

From your Cloud9 terminal environment, type the following (the S3 bucket you are uploading to is the one you created when setting up your development environment):

aws s3 sync /home/ec2-user/environment/ccoa s3://ccoa-$(aws sts get-caller-identity --output text --query 'Account')
  1. Go to the CloudFormation Console
  2. Click Create stack
  3. Enter https://mybucket.s3.amazonaws.com/ccoa-1-cfn.yml in the Amazon S3 URL field (replacing mybucket the S3 bucket you created)
  4. Click Next
  5. Enter ccoa-1-cfn for the Stack name and click Next on the Specify stack details page
  6. Select Disabled radio button for Rollback on failure under Stack creation options
  7. Click Next
  8. Click Create stack

CloudFormation Console

View the Outputs

  1. Go to the CloudFormation console and select the stack once it is CREATE_COMPLETE, select the Outputs tab and select the checkbox next to the stack and click the Outputs tab.
  2. From Outputs, view the SourceQueueARN output.

Resources

Cleanup

Go to Cleanup to remove any resources you created in this sublesson.

Clone this wiki locally