当我提供 QueueName 时,AWS Cloudformation 失败
我有时在 AWS 中的 Cloudformation 中观察到这种行为。
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
以上失败。但是,如果我评论 QueueName 它就会起作用。
当然,模板中还有其他内容,但出于隐私考虑,我省略了它们。 谁能指出我的医生为什么会发生这种情况?这与 Cloudformation 模板版本有关系吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论