interface ViewerCertificateOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.ViewerCertificateOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#ViewerCertificateOptions |
![]() | software.amazon.awscdk.services.cloudfront.ViewerCertificateOptions |
![]() | aws_cdk.aws_cloudfront.ViewerCertificateOptions |
![]() | aws-cdk-lib » aws_cloudfront » ViewerCertificateOptions |
Example
const s3BucketSource = new s3.Bucket(this, 'Bucket');
const distribution = new cloudfront.CloudFrontWebDistribution(this, 'AnAmazingWebsiteProbably', {
originConfigs: [{
s3OriginSource: { s3BucketSource },
behaviors: [{ isDefaultBehavior: true }],
}],
viewerCertificate: cloudfront.ViewerCertificate.fromIamCertificate(
'certificateId',
{
aliases: ['example.com'],
securityPolicy: cloudfront.SecurityPolicyProtocol.SSL_V3, // default
sslMethod: cloudfront.SSLMethod.SNI, // default
},
),
});
Properties
Name | Type | Description |
---|---|---|
aliases? | string[] | Domain names on the certificate (both main domain name and Subject Alternative names). |
security | Security | The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. |
ssl | SSLMethod | How CloudFront should serve HTTPS requests. |
aliases?
Type:
string[]
(optional)
Domain names on the certificate (both main domain name and Subject Alternative names).
securityPolicy?
Type:
Security
(optional, default: SSLv3 if sslMethod VIP, TLSv1 if sslMethod SNI)
The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.
CloudFront serves your objects only to browsers or devices that support at least the SSL version that you specify.
sslMethod?
Type:
SSLMethod
(optional, default: SSLMethod.SNI)
How CloudFront should serve HTTPS requests.
See the notes on SSLMethod if you wish to use other SSL termination types.