How to use @cloudcomponents/cdk-static-website - 1 common examples

To help you get started, we’ve selected a few @cloudcomponents/cdk-static-website examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudcomponents / cdk-components / examples / static-website-example / src / static-website-stack.ts View on Github external
public constructor(parent: App, name: string, props?: StackProps) {
        super(parent, name, props);

        const certificateArn = StringParameter.valueFromLookup(
            this,
            '/certificate/cloudcomponents.org',
        );

        new StaticWebsite(this, 'StaticWebsite', {
            bucketConfiguration: {
                removalPolicy: RemovalPolicy.DESTROY,
            },
            aliasConfiguration: {
                domainName: 'cloudcomponents.org',
                names: ['www.cloudcomponents.org', 'cloudcomponents.org'],
                acmCertRef: certificateArn,
            },
        });
    }
}

@cloudcomponents/cdk-static-website

Cdk component that creates a static website using S3, configures CloudFront (CDN) and maps a custom domain via Route53 (DNS)

MIT
Latest version published 2 days ago

Package Health Score

78 / 100
Full package analysis

Popular @cloudcomponents/cdk-static-website functions