Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@scaleleap/cdk-shared-static-website-hosting

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scaleleap/cdk-shared-static-website-hosting

> Creates a shared static website hosting on CloudFront.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

Shared Static Website Hosting via AWS CDK

Creates a shared static website hosting on CloudFront.

Install

npm i @scaleleap/cdk-shared-static-website-hosting

Usage

import { HostedZone } from 'aws-cdk-lib/aws-route53';
import { SharedStaticWebsiteHosting } from '@scaleleap/cdk-shared-static-website-hosting';

const rootZone = HostedZone.fromLookup(scope, 'RootZone', {
  domainName: 'static.example.com',
});

const swp = new SharedStaticWebsiteHosting(scope, 'SharedStaticWebsiteHosting', {
  hostedZone: rootZone,
});

Explanation

The following will be created for you:

  • An S3 bucket to store static website files
  • A CloudFront distribution to serve the website
  • A wilcard A DNS record to map sub-domain to the S3 prefix
  • An SSL/TLS certificate for the wildcard sub-domain

And the sub-domain will map to the S3 key prefix.

For example:

If you place your static website into:

s3://my-bucket/foo1/index.html
s3://my-bucket/foo1/image.png

The website will be served at:

https://foo1.static.example.com/

Keywords

FAQs

Package last updated on 16 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc