Skip to content
This is a sample project of static web site hosted on S3 for TypeScript development with CDK.
TypeScript HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
public
test
.gitignore
.npmignore
README.md
cdk.context.json
cdk.json
jest.config.js
package-lock.json
package.json
stack-config.yml.sample
tsconfig.json

README.md

static-website-sample

This is a sample project for TypeScript development with CDK.
You can create a static web site hosted on S3 using this project.

Usase

  1. prepare

    $ npm install
    $ cdk bootstrap
  2. create config file

    $ cp stack-config.yml.sample stack-config.yml

    Set environment variables in the following yaml format.

    common:
      region: <deploy-target-region> #eg: ap-northeast-1
    
    route53:
      zone: <existed-hosted-zone-name> #eg: example.com
      zone_id: <existed-hosted-zone-id> #eg: ABCD123467890
      sub_domain: <hostname-of-sub-domain (optional)> #eg: static-website-sample (if you want to host this site as "static-website-sample.example.com")

    You can check the values ​​of route53.zone and route53.zone_id in the Route 53 management console.

  3. build

    $ cdk synth
  4. deploy

    $ cdk deploy
  5. check

    Access the domain you set up (rg: static-website-sample.example.com), and check if the web page is displayed correctly.

You can’t perform that action at this time.