1 year ago
#387377
amitection
AWS Cloudformation fails when I provide a QueueName
There is this behaviour I have observed sometimes with Cloudformation in AWS.
Description: Something here....
Parameters:
StackName:
Description: reference the StackName
Type: String
StageName:
Description: reference the environment type (local, alpha, beta, uat, prod)
Type: String
Resources:
FileGenerationDLQ:
Type: AWS::SQS::Queue
Properties:
QueueName: !Sub "${StackName}-FileGenerationDLQ-${StageName}"
MessageRetentionPeriod: 1209600
ReceiveMessageWaitTimeSeconds: 20
VisibilityTimeout: 925
FileGenerationQueue:
DependsOn: FileGenerationDLQ
Type: AWS::SQS::Queue
Properties:
QueueName: !Sub "${StackName}-FileGeneration-${StageName}"
MessageRetentionPeriod: 1209600
ReceiveMessageWaitTimeSeconds: 0
VisibilityTimeout: 925
RedrivePolicy:
deadLetterTargetArn: !GetAtt FileGenerationDLQ.Arn
maxReceiveCount: 1
The above fails. However, if I comment the QueueName it works.
Ofcourse I have other things in the template but I have omitted them for privacy. Could anyone point me to the doc why this is happening? Does this have something to do with the Cloudformation template versions?
amazon-web-services
aws-cloudformation
amazon-sqs
0 Answers
Your Answer