【问题标题】:How to resolve this error - Value of property {/DistributionConfig/Aliases} does not match type {Array}如何解决此错误 - 属性值 {/DistributionConfig/Aliases} 与类型 {Array} 不匹配
【发布时间】:2019-07-29 00:05:03
【问题描述】:

我在创建发行版时遇到此错误

error msg

这是我的代码

this is my code

【问题讨论】:

  • 你实际在运行什么?如果您在 AWS 控制台中单击按钮,请指定您按下的按钮。

标签: amazon-web-services amazon-cloudformation amazon-cloudfront


【解决方案1】:

看起来"Aliases" 需要是一个数组,但你提供了一个对象。尝试将{} 更改为[],如下所示:

"Aliases": [
    ... 
]

【讨论】:

    【解决方案2】:

    我们需要将别名保存在数组中

                        "DefaultRootObject" : "index.html",
                        "Aliases" : [
                                    "Fn::Join": [
                                        "", [
                                            "fastlanedocs",
                                            {
                                                "Ref": "EnvironmentName"
                                            },
                                            ".wm.com"
                                        ]
                                    ]
                                ],
                        "DefaultCacheBehavior" : {
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-05
      • 2016-08-09
      • 2013-12-22
      • 1970-01-01
      • 2018-06-08
      • 2021-10-15
      • 1970-01-01
      • 2015-07-25
      相关资源
      最近更新 更多