Io sono la distribuzione mia pagina singola app ad un S3 secchio via AWS-CDK.
Stack corrente codice è:
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'
}
]
});
Tuttavia, in AWS-CDK 1.133 ho ricevuto il messaggio che aliasConfiguration
è deprecato. Così sto cercando di viewerCertificate: ViewerCertificate.fromAcmCertificate()
ma io non sono sicuro di come usarlo.
Prima che io potessi vedere il ARN del Certificato che ho già creato in Gestione Certificati.
Posso usare il Certificate
classe per ottenere un riferimento esistente ACM di risorse e l'uso che con il ViewerCertificate?
AWS è docs non sono molto chiare in esempi, a tutti i riferimenti.