Setting Minimum Protocol Version for HttpsRedirect in CDK

To change the minimum protocol version when using Https redirect route 53 patterns you must first find the RedirectDistribution and then in that the defaultChild then you can add a poroperty override for the DistributionConfig.ViewerCertificate.MinimumProtocolVersion property, setting the tls version. In my case I used TLSv1.2_2021 find all the versions here ->

const redirect = new aws_route53_patterns.HttpsRedirect(this, 'Redirect', {
            recordNames: [`www.${config.zoneName}`],
            targetDomain: config.zoneName,

const override = redirect.node.tryFindChild('RedirectDistribution') as cf.CfnDistribution;
const cfnDistribution = override.node.defaultChild as cf.CfnDistribution;
        cfnDistribution.addPropertyOverride('DistributionConfig.ViewerCertificate.MinimumProtocolVersion', 'TLSv1.2_2021');

Categories: AWS

Tags: , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: