【发布时间】:2020-06-03 23:57:29
【问题描述】:
以下 sn-p 来自 Cloudformation 形成模板:
...
LambdaFunctionAssociations:
- !If
- ProtectDistribution
-
- EventType: viewer-request
LambdaFunctionARN: !GetAtt LambdaEdgeProtection.Outputs.CheckAuthHandler
- EventType: origin-response
LambdaFunctionARN: !GetAtt LambdaEdgeProtection.Outputs.HttpHeadersHandler
- !Ref AWS::NoValue
...
它是 CloudFront 分配的 DistributionConfig 内的 DefaultCacheBehavior 的一部分。尝试创建堆栈时出现此错误:
Property validation failure: [Value of property {/DistributionConfig/DefaultCacheBehavior/LambdaFunctionAssociations/0} does not match type {Object}]
请问我哪里出错了?
【问题讨论】:
标签: amazon-web-services amazon-cloudformation amazon-cloudfront