I am trying to create a SQSQueue and attach permission to it via SQS::QueuePolicy. Following is my cloud Formation template -
Template
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"MySQS": {
"Type": "AWS::SQS::Queue",
"Properties": {
"QueueName": "QueueName1"
}
},
"MySQSPolicy": {
"Type": "AWS::SQS::QueuePolicy",
"Properties": {
"Queues": [
{
"Fn::GetAtt" : ["MySQS", "Arn"]
}
],
"PolicyDocument": {
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": ["1234567689111"]
},
"Action": [
"SQS:SendMessage"
]
}
]
}
}
}
}
}
Error
I tried creating stack via AWS Console, SQS Queue
creation is successful ,but receiving below error for SQS policy
creation -
The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID: e2611b4d-6166-5bf3-9205-4d0590e34f84)
I have referred the documentation but can't figure out what the problem is? Any ideas what is wrong here?