为了账号安全,请及时绑定邮箱和手机立即绑定

在InvalidViewerCertificate中使用默认Viewer证书创建AWS分配

在InvalidViewerCertificate中使用默认Viewer证书创建AWS分配

PHP
慕的地8271018 2021-05-03 09:05:15
我正在尝试通过API创建新的AWS分配,我在其中进行以下设置:    "ViewerCertificate": {        "CloudFrontDefaultCertificate": true    },这应该使用默认的CF证书,但结果是我收到此错误:InvalidViewerCertificateTo 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    },这实际上在几周前就可以了,但是可能有所改变。或者,也许默认证书所允许的分发数量受到限制?
查看完整描述

1 回答

?
慕沐林林

TA贡献2016条经验 获得超9个赞

我认为这是由于CloudFront最近发布的消息:

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

由于您要添加CNAME:“别名”:{“数量”:2,“项目”:[“ www.xxyz.com”,“ xyz.com”]}


查看完整回答
反对 回复 2021-05-07
  • 1 回答
  • 0 关注
  • 230 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号