/s3-static-website

Credit to example here https://github.com/pulumi/examples/blob/master/aws-ts-static-website/index.ts

Primary LanguageTypeScript

S3 Static Website

Deploy a static https website hosted on s3

Credit to example here https://github.com/pulumi/examples/blob/master/aws-ts-static-website/index.ts

Prerequisites

Usage

First create yourself a stack file named Pulumi<CHOOSE STACK NAME>.yaml with the following contents

config:
  aws:region: eu-west-1
  aws:profile: <YOUR PROFILE NAME>
  s3-static-website:domain: <www.YOURDOMAIN>
  s3-static-website:pathToWebsiteContents: ./www
    description: Relative path to the website's contents (e.g. the `./www` folder)
  s3-static-website:certificateArn: arn:aws:acm:us-east-1:<YOUR CERTIFICATE ARN>
    description: (Optional) ACM certificate ARN for the target domain; must be in the us-east-1 region. If omitted, a certificate will be created.
yarn install or npm install
pulumi preview
pulumi up

GitHub Actions

You can also deploy by using actions. The actions in this repo work when you create a Pull Request, then merge to master. You'll need to add the credentials mentioned below as secrets to your github repo

Required

Outputs

  • targetDomainEndpoint
  • cloudFrontDomain
  • mainBucketURI
  • mainBucketWebsiteEndpoint