Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 875 Bytes

11-create-and-deploy-an-s3-bucket-with-aws-cdk.md

File metadata and controls

30 lines (18 loc) · 875 Bytes

Create and deploy an S3 bucket with AWS CDK

📹 Video

We'll need storage for our static files (HTML, CSS, images etc). Let's use Amazon S3 for that.

S3 Buckets Illustration

We'll create a new aws bucket to store our data!

Run:

  • npm install --save @aws-cdk/aws-s3

Import it into our stack document:

  • import * as s3 from "@aws-cdk/aws-s3";

Let's create a new bucket for storing a logo:

const logoBucket = new s3.Bucket(this, "LogoBucket", {
    // we will fill this out later
});

Run:

  • cdk diff and cdk deploy.

You can find the bucket under aws resources (search for s3).