[英]how to set AWS::AccountId in serverless config file?
I have a serverless.yml file that contains the following: 我有一个serverless.yml文件,其中包含以下内容:
environment:
accountId: '#{AWS::AccountId}'
region: us-east-2
env.accountId is coming back as undefined. env.accountId返回为未定义。 Where and how do I set that?
我在哪里以及如何设置?
Ensure you have the serverless-pseudo-parameters installed. 确保已安装了无服务器伪参数 。
Install the package with npm:
npm install serverless-pseudo-parameters
, and add it to your serverless.yml plugins list:使用npm安装软件包:
npm install serverless-pseudo-parameters
,并将其添加到serverless.yml插件列表中:
plugins:
- serverless-pseudo-parameters
Also, make sure you have AWS credentials available on the machine you are running from. 此外,请确保在运行机器的计算机上具有可用的AWS凭证。 These are needed to resolve these values.
这些是解析这些值所必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.