This documentation is for the developer preview release of the AWS CDK. Do not use this version of the AWS CDK in production. Subsequent releases of the AWS CDK will likely include breaking changes.

Assets

Assets are local files, directories or docker images which can be bundled into CDK constructs and apps. A common example is a directory which contains the handler code for an AWS Lambda function, but assets can represent any artifact that is needed for the app’s operation.

When deploying an AWS CDK app that includes constructs with assets, the toolkit will first prepare and publish them to S3 or ECR, and only then deploy the stacks. The locations of the published assets will be passed in as CloudFormation Parameters to the relevant stacks.

See Assets for documentation about file assets and Docker Assets for documentation about Docker image assets.