1. 15
    Use a bucket deployment to upload a file to S3 when deploying a CDK stack
    1m 32s

Use a bucket deployment to upload a file to S3 when deploying a CDK stack

Share this video with your friends

Send Tweet

Instead of uploading the files manually through the AWS console, a better solution would be to automatically upload the asset directory (or any other directory we'd like to upload) whenever we deploy our stack. After all, with CDK we'd like to reduce the manual work to minimum and focus on building an architecture and solving our problems.

In this lesson we're going to learn how to use the aws-s3-deployment construct in order to upload an assets directory to an s3 bucket automatically whenever we deploy the CDK stack.

Sivaprasad Chidambaram
Sivaprasad Chidambaram
~ 4 years ago

I have one query, does AWS CDK support all infrastructure components like creating VPC, EC2 instances, NAT gateway, load balancers etc.

Tomasz Łakomy
Tomasz Łakomy(instructor)
~ 4 years ago

I have one query, does AWS CDK support all infrastructure components like creating VPC, EC2 instances, NAT gateway, load balancers etc.

Absolutely! Take a look at https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html - CDK has constructs for nearly every single AWS service!

Kathrin
Kathrin
~ 4 years ago

In case anyone else runs into 'Assets must be defined indirectly within a "Stage" or an "App" scope', I had to lock all my AWS node module versions to 1.62.0 after upgrading to 1.64.1.