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 cfn-example-1.yml

Open the cfn-example-1.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 (replace mybucket with the bucket name you created when creating an S3 bucket)

aws s3 sync /home/ec2-user/environment/ccoa s3://mybucket
  1. Go to the CloudFormation Console
  2. Click Create stack
  3. Enter https://mybucket.s3.amazonaws.com/cfn-example-1.yml in the Amazon S3 URL field (replacing mybucket with your unique name)
  4. Click Next
  5. Enter cfn-example-1 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