Creating an Amazon SQS queue using AWS CloudFormation (original) (raw)
Use the AWS CloudFormation console along with a JSON or YAML template to create an Amazon SQS queue. For more details, see Working with AWS CloudFormation Templates and the AWS::SQS::Queue Resource in the_AWS CloudFormation User Guide_.
To use AWS CloudFormation to create an Amazon SQS queue.
- Copy the following JSON code to a file named
MyQueue.json
. To create a standard queue, omit theFifoQueue
andContentBasedDeduplication
properties. For more information on content-based deduplication, see Exactly-once processing in Amazon SQS.
Note
The name of a FIFO queue must end with the .fifo
suffix.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"MyQueue": {
"Properties": {
"QueueName": "MyQueue.fifo",
"FifoQueue": true,
"ContentBasedDeduplication": true
},
"Type": "AWS::SQS::Queue"
}
},
"Outputs": {
"QueueName": {
"Description": "The name of the queue",
"Value": {
"Fn::GetAtt": [
"MyQueue",
"QueueName"
]
}
},
"QueueURL": {
"Description": "The URL of the queue",
"Value": {
"Ref": "MyQueue"
}
},
"QueueARN": {
"Description": "The ARN of the queue",
"Value": {
"Fn::GetAtt": [
"MyQueue",
"Arn"
]
}
}
}
}
- Sign in to the AWS CloudFormation console, and then choose Create Stack.
- On the Specify Template panel, choose Upload a template file, choose your
MyQueue.json
file, and then choose Next. - On the Specify Details page, type
MyQueue
forStack Name, and then chooseNext. - On the Options page, choose Next.
- On the Review page, chooseCreate.
AWS CloudFormation begins to create theMyQueue
stack and displays theCREATE_IN_PROGRESS status. When the process is complete, AWS CloudFormation displays the CREATE_COMPLETE status. - (Optional) To display the name, URL, and ARN of the queue, choose the name of the stack and then on the next page expand the Outputs section.
Tutorials
Sending a message from a VPC
Did this page help you? - Yes
Thanks for letting us know we're doing a good job!
If you've got a moment, please tell us what we did right so we can do more of it.
Did this page help you? - No
Thanks for letting us know this page needs work. We're sorry we let you down.
If you've got a moment, please tell us how we can make the documentation better.