Skip to content

Instantly share code, notes, and snippets.

@riccardogiorato
Last active June 8, 2021 06:26
Show Gist options
  • Save riccardogiorato/9520b9cdf172454a3260141702104ecd to your computer and use it in GitHub Desktop.
Save riccardogiorato/9520b9cdf172454a3260141702104ecd to your computer and use it in GitHub Desktop.
CDK s3 deployment example
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,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment