我部署我的单页应用程序,以S3桶经由AWS CDK。
目前的叠代码是:
this.distribution = new CloudFrontWebDistribution(this, `${this.props.applicationName}Distribution`, {
originConfigs: [
{
s3OriginSource: {
s3BucketSource: this.dashboardBucket,
originAccessIdentity: dashboardIdentity
},
behaviors: [{
isDefaultBehavior: true
}],
},
],
aliasConfiguration: {
acmCertRef: awsConfig.acm_arn,
names: [url]
},
errorConfigurations: [
{
errorCode: 403,
responseCode: 200,
responsePagePath: '/'
},
{
errorCode: 404,
responseCode: 200,
responsePagePath: '/index.html'
}
]
});
然而,。-CDK1.133我得到的消息, aliasConfiguration
是废弃。 所以我看着 viewerCertificate: ViewerCertificate.fromAcmCertificate()
但我不知道如何使用它。
之前,我可以指ARN的证书,我已经创建证书管理员。
我可以使用 Certificate
类得到一个参考现有含石棉材料的资源和使用,与ViewerCertificate?
基础,或者文档不是超级明确的例子,只是所有参考文献。