Skip to content

Instantly share code, notes, and snippets.

@riccardogiorato
Created June 8, 2021 05:58
Show Gist options
  • Save riccardogiorato/428d015dee054d3cb9b06941851ab018 to your computer and use it in GitHub Desktop.
Save riccardogiorato/428d015dee054d3cb9b06941851ab018 to your computer and use it in GitHub Desktop.
import * as s3Deployment from "@aws-cdk/aws-s3-deployment";
const websiteBucket = new s3.Bucket(this, 'WebsiteBucket', {
websiteIndexDocument: 'index.html',
publicReadAccess: true
});
new s3deploy.BucketDeployment(this, 'DeployWebsite', {
sources: [s3deploy.Source.asset('./website-dist')],
destinationBucket: websiteBucket,
memoryLimit: 1024
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment