在troposhphere,我试图将CustomOriginConfig添加到我的CloudFront发行版中。
.....
Origins = [Origin(
Id = Join("", ["cloudfront-", Ref("ParamOriginName")]),
DomainName = Ref("ParamOriginName"),
CustomOriginConfig(
OriginProtocolPolicy = "https-only",
OriginSSLProtocols = ["TLSv1.1"]
)
)],
.....
这无法建立,并给出以下错误:
CustomOriginConfig(
^
SyntaxError: positional argument follows keyword argument
该如何解决?
答案 0 :(得分:0)
您需要创建一个变量,其值为CustomOriginConfig对象
Origins = [Origin(
Id = Join("", ["cloudfront-", Ref("ParamOriginName")]),
DomainName = Ref("ParamOriginName"),
CustomOriginConfig = CustomOriginConfig(
OriginProtocolPolicy = "https-only",
OriginSSLProtocols = ["TLSv1.1"]
)
)],