如何在 CloudFormation 模板中引用尚未创建的 SQS 队列

How to reference an SQS queue which has not been created yet in CloudFormation template

我的云形成模板中有一个定义的队列资源。现在。在同一个模板中,我定义了一个队列策略,我想在其中允许对队列进行某些操作。对于策略声明中的属性“资源”,我如何引用尚未创建的队列名称/arn?

您可以从队列 return values 中获取 ARN。具体取决于您定义政策的方式,它可能是:

!GetAtt <your-queue-resource>.Arn