首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在InvalidViewerCertificate中使用默认查看器证书创建AWS分发

在InvalidViewerCertificate中使用默认查看器证书创建AWS分发
EN

Stack Overflow用户
提问于 2019-04-20 00:16:13
回答 1查看 199关注 0票数 1

我正在尝试通过API创建新的AWS分发,我正在设置:

    "ViewerCertificate": {
        "CloudFrontDefaultCertificate": true
    },

这应该使用默认的CF证书,但结果是我得到了这个错误:

InvalidViewerCertificate
To add an alternate domain name (CNAME) to a CloudFront distribution, you must attach a trusted certificate that validates your authorization to use the domain name.

{
"DistributionConfig": {
    "Aliases": {
        "Quantity": 2,
        "Items": ["www.xxyz.com", "xyz.com"]
    },
    "DefaultRootObject": "",
    "Origins": {
        "Quantity": 1,
        "Items": [{
            "Id": "RJMn5FUTvrqoh-cloudfrontxyz.com",
            "DomainName": "chzsgor80ynsme.xyz.com",
            "OriginPath": "",
            "CustomHeaders": {
                "Quantity": 0
            },
            "CustomOriginConfig": {
                "HTTPPort": 80,
                "HTTPSPort": 443,
                "OriginProtocolPolicy": "http-only",
                "OriginSslProtocols": {
                    "Quantity": 4,
                    "Items": ["SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"]
                }
            }
        }]
    },
    "DefaultCacheBehavior": {
        "TargetOriginId": "RJMn5FUTvrqoh-cloudfrontxyz.com",
        "ForwardedValues": {
            "QueryString": true,
            "Cookies": {
                "Forward": "all"
            },
            "Headers": {
                "Quantity": 1,
                "Items": ["Host"]
            }
        },
        "TrustedSigners": {
            "Enabled": false,
            "Quantity": 0
        },
        "ViewerProtocolPolicy": "allow-all",
        "AllowedMethods": {
            "Quantity": 7,
            "Items": ["HEAD", "DELETE", "POST", "GET", "OPTIONS", "PUT", "PATCH"],
            "CachedMethods": {
                "Quantity": 2,
                "Items": ["HEAD", "GET"]
            }
        },
        "SmoothStreaming": false,
        "MinTTL": 0,
        "DefaultTTL": 3600,
        "MaxTTL": 31536000,
        "Compress": false
    },
    "CacheBehaviors": {
        "Quantity": 0
    },
    "CustomErrorResponses": {
        "Quantity": 0
    },
    "Comment": "",
    "Logging": {
        "Enabled": false,
        "Bucket": "",
        "Prefix": "",
        "IncludeCookies": true
    },
    "Enabled": true,
    "PriceClass": "PriceClass_100",
    "ViewerCertificate": {
        "CloudFrontDefaultCertificate": true
    },
    "Restrictions": {
        "GeoRestriction": {
            "RestrictionType": "none",
            "Quantity": 0
        }
    },
    "WebACLId": "",
    "CallerReference": "xyz-1555690298"
}

}

这在几周前实际上是有效的,但可能发生了一些变化。或者,可能对默认证书允许的分发数量有限制?

谢谢你的帮助!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-20 01:14:53

我认为这是因为CloudFront最近的声明:

https://forums.aws.amazon.com/ann.jspa?annID=6725

由于您添加的是CNAME:“别名”:{“数量”:2,"Items":"www.xxyz.com","xyz.com“}

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55764736

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档