Become a member
to unlock all features

    Deploy a site with HTTPS support behind a CDN with CDK


    Deploying a static site to S3 works really well unless we consider the fact that you cannot add HTTPS support to the site directly in S3. In order to do that - a CloudFront distribution is required.

    While it is possible to setup CloudFront with CDK on our own, we don't always have to do anything on our own.

    Instead, we can use constructs that were created by the community.

    In this quick lesson we're going to learn how to use CDK-SPA-Deploy construct in order to deploy our app to S3 (using createBasicSite construct) and deploy it with HTTPS support and behind a CloudFront CDN distribution.