Skip to main content

A CDK Python construct to create static S3 websites. This is a port of the AWS static site example

Project description

Simple static site CDK construct

This constructs creates a static website hosted on S3.


  • Hosted zone in Route53


This constructs creates:

  • S3 bucket
  • DNS Validated certificate
  • CloudFront web distribution
  • Route53 A record
from aws_cdk.core import Stack, Construct
from static_website import StaticWebsite
from aws_cdk.aws_route53 import HostedZone

class WebSiteStack(Stack):
    def __init__(self, scope: Construct, id: str, **kwargs):

        super().__init__(scope, id, **kwargs)

        # The code that defines your stack goes here

        zone = HostedZone.from_lookup(self, "HostedZone", 

        StaticWebsite(self, "serverlesslink-website",

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cdk-static-website, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size cdk_static_website-0.1.0-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cdk-static-website-0.1.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page