【发布时间】:2021-01-14 12:23:45
【问题描述】:
我正在使用 Elastic Beanstalk 通过 SQS 部署工作层环境。
在我的.ebextensions 我有以下文件:
option_settings:
aws:elasticbeanstalk:sqsd:
WorkerQueueURL:
Ref: WorkerQueue
HttpPath: "/sqs/"
InactivityTimeout: 1650
VisibilityTimeout: 1680
MaxRetries: 1
Resources:
WorkerQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: "tpc-clients-aws-queue"
VisibilityTimeout: 1680
但是,这会失败并出现以下错误:
其中一个配置文件中的“option_settings”验证失败。更多详情请关注。
无效的选项值:'Ref=WorkerQueue'(命名空间:'aws:elasticbeanstalk:sqsd',OptionName:'WorkerQueueURL'):值不满足正则表达式:'^$|^http(s)?://。 +$' [以 http(s) 开头的有效非空 URL]
AWSCloudFormation Ref function 似乎不能在option_settings 中使用。有人可以确认是否是这种情况吗?
我在 StackOverflow 上看到了一些使用 option_settings 中的内部函数的代码 sn-ps,例如在 this answer 的 mount-config.config 和 this question 中。那么,这些示例是否使用了无效的语法?或者option_settings上有一些内在的功能或者特定的资源可以使用?
最后,如果我不能使用 Ref 功能,我该怎么办?
【问题讨论】:
-
进展如何?仍然不清楚你能做什么?你知道你可以接受你自己的答案来解决问题吗?
标签: amazon-web-services amazon-elastic-beanstalk amazon-cloudformation amazon-sqs