【发布时间】:2018-11-09 01:19:41
【问题描述】:
我想使用 cloudformation 映射为我的 lambda 函数设置环境变量。因此我使用Fn::FindInMap 从映射中获取变量的值。但我收到了错误 - Value of property Variables must be an object with String (or simple type) properties
Mappings:
DomainResourceMapping:
DUBCrossAccountIAMRole:
beta: "xyz"
prod: "act"
Resources:
LambdaFunction:
Type: AWS::Serverless::Function
Properties:
Handler: '...t'
Runtime: java8
CodeUri:
Bucket: ...
Key: ...
Description: nn
Timeout: 20
MemorySize: 512
Environment:
Variables:
DUB_CROSS_ACCOUNT_IAM_ROLE:
- Fn::FindInMap:
- DomainResourceMapping
- DUBCrossAccountIAMRole
- {Ref: Stage}
【问题讨论】:
标签: amazon-web-services aws-lambda amazon-cloudformation serverless-framework