Created
July 18, 2019 15:19
-
-
Save lampidudelj/ba70576fad2f0ed2d8d9866382cd432e to your computer and use it in GitHub Desktop.
aws-cdk stack with s3 bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cdk = require('@aws-cdk/core'); | |
import s3 = require('@aws-cdk/aws-s3'); | |
export class AwsCdkStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
const s3Bucket = new s3.Bucket(this, 'host-bucket', { | |
bucketName: `react-host-bucket-${Date.now()}`, | |
websiteIndexDocument: 'index.html', | |
websiteErrorDocument: 'error.html', | |
publicReadAccess: true | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment