# SSLMethod

The SSL method CloudFront will use for your distribution.

Server Name Indication (SNI) - is an extension to the TLS computer networking protocol by which a client indicates
 which hostname it is attempting to connect to at the start of the handshaking process. This allows a server to present
 multiple certificates on the same IP address and TCP port number and hence allows multiple secure (HTTPS) websites
(or any other service over TLS) to be served by the same IP address without requiring all those sites to use the same certificate.

CloudFront can use SNI to host multiple distributions on the same IP - which a large majority of clients will support.

If your clients cannot support SNI however - CloudFront can use dedicated IPs for your distribution - but there is a prorated monthly charge for
using this feature. By default, we use SNI - but you can optionally enable dedicated IPs (VIP).

See the CloudFront SSL for more details about pricing : https://aws.amazon.com/cloudfront/custom-ssl-domains/

- Source: [`aws-cloudfront/lib/distribution.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudfront/lib/distribution.ts#L993)
- Type last changed: v2.190.0 · 17 Apr 2025

## Example

```ts
    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
        },
      ),
    });
```

## Members

| Member | Description |
| --- | --- |
| `SNI` |  |
| `VIP` |  |
| `STATIC_IP` |  |

## Referenced by

- [`DistributionProps`](/v2/docs/aws-cdk-lib.aws_cloudfront.DistributionProps).sslSupportMethod
- [`ViewerCertificateOptions`](/v2/docs/aws-cdk-lib.aws_cloudfront.ViewerCertificateOptions).sslMethod
