Skip to main content

Simple static site CDK construct

This constructs creates a static website hosted on S3.

Requirements

  • Hosted zone in Route53

Usage

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", 
                                      domain_name="mydomain.com", 
                                      private_zone=False)

        StaticWebsite(self, "serverlesslink-website",
                              hosted_zone=zone,
                              site_domain="blog.mydomain.com",
                              sources="../public",
                              website_error="404.html")

Metadata

Release files for cdk-static-website 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk-static-website 0.1.0
File Size Uploaded Provenance Actions
cdk-static-website-0.1.0.tar.gz 3.3 kB Without provenance Details for cdk-static-website-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdk-static-website 0.1.0
File Interpreter ABI Platform Actions
cdk_static_website-0.1.0-py3-none-any.whl Python 3 none any Details for cdk_static_website-0.1.0-py3-none-any.whl

Total release size: 7.1 kB

Release files / cdk-static-website-0.1.0.tar.gz

Download URL cdk-static-website-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b3619995c247c2f54680493efde3d96ab6f6eec521ca5094f82891512553aaa0
BLAKE2b-256 checksum
How to use checksums
f002428d7a31ce0470b3ecdd14e1bfd73bc26b338180ae3d43379463f88e23de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.2

Release files / cdk_static_website-0.1.0-py3-none-any.whl

Download URL cdk_static_website-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2347f4aee749beb59045e7bc85f4d7529eabf0c1fec6acc9f4c7b2aaf52862ae
BLAKE2b-256 checksum
How to use checksums
0d17ed75a11ed42d5dc52e39fa8e34b21f7d5a76c155bb338e3bd36ed0d178c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.2

Security for cdk-static-website 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page