-
Notifications
You must be signed in to change notification settings - Fork 57
1.2
Paul Duvall edited this page Oct 25, 2019
·
10 revisions
Review and ensure that you have setup your development environment before going through the steps below.
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"
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')
- Go to the CloudFormation Console
- Click Create stack
- Enter
https://mybucket.s3.amazonaws.com/cfn-example-1.ymlin the Amazon S3 URL field (replacingmybucketthe S3 bucket you created) - Click Next
- Enter
cfn-example-1for the Stack name and click Next on the Specify stack details page - Select Disabled radio button for Rollback on failure under Stack creation options
- Click Next
- Click Create stack

- 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.
- From Outputs, view the SourceQueueARN output.
- Download the cfn-example-1.yml CloudFormation template.
Go to Cleanup to remove any resources you created in this sublesson.