--- id: aws-cdk-aws-s3-assets version: "1.204.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.aws-s3-assets — Deploy local files and directories to S3 License: permissive · Maintenance: active · Downloads: 184.8K/mo ## What it is and what it does aws-cdk.aws-s3-assets is a component of AWS CDK v1 that automates the packaging and deployment of local files and directories to S3 during CDK stack synthesis. When you define an Asset construct pointing to a local path, the toolkit automatically archives the content (if it's a directory), calculates an MD5 hash, uploads it to an environment-specific S3 bucket, and injects the S3 location as CloudFormation parameters into your stacks. This is commonly used to bundle Lambda function code, static assets, or any artifact needed by your infrastructure. The package supports optional Docker-based bundling for preprocessing assets before upload—for example, compiling code, converting file formats, or installing dependencies. You can also implement local bundling providers to avoid Docker overhead. Assets expose deploy-time attributes like bucket name, object key, and HTTP URL that can be referenced in your stack outputs or passed to other constructs. The package integrates deeply with CDK's synthesis and deployment pipeline, handling asset versioning and deduplication transparently. Use it for: - Package Lambda function handler code and dependencies into a zip file for upload to S3 during CDK deployment - Bundle static web assets or configuration files and inject their S3 URLs into CloudFormation stacks - Use Docker containers to preprocess assets (e.g., compile TypeScript, minify CSS) before uploading to S3 - Grant IAM roles read permissions on deployed assets using the grantRead() method for runtime access - Export asset S3 locations as stack outputs for reference by other stacks or external tools ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Packages local files and directories for deployment to S3 as part of AWS CDK applications, handling asset bundling, hashing, and CloudFormation parameter injection. No—this package is part of AWS CDK v1, which reached End-of-Support on 2023-06-01 and is no longer being updated. AWS explicitly recommends migrating to AWS CDK v2. Install only if maintaining legacy v1 infrastructure; for new projects or migrations, use the v2 equivalent instead. ## Install pip install aws-cdk-aws-s3-assets uv add aws-cdk-aws-s3-assets poetry add aws-cdk-aws-s3-assets ## Installing aws-cdk.aws-s3-assets Before you install: Low friction installation with 10 runtime dependencies. Package is in active maintenance status but reached End-of-Support on 2023-06-01; AWS CDK v1 is no longer being updated and users should migrate to AWS CDK v2. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions. Quickstart: from aws_cdk import aws_s3_assets as assets import os asset = assets.Asset(None, "SampleAsset", path=os.path.join(os.path.dirname(__file__), "sample-asset-directory") ) print(asset.s3_bucket_name) print(asset.s3_object_key) Requires AWS CDK core and construct libraries to be installed; asset bundling with Docker requires Docker to be available or a local bundling provider to be implemented. Verify before relying: - Whether v1 packages continue to receive security patches despite End-of-Support status - Migration path complexity and effort for existing v1 applications moving to v2 ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 184.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aws cdk s3 asset deployment, local file packaging for aws, cdk asset bundling, s3 asset management, cloudformation asset parameters, lambda code packaging aws, docker bundling for cdk, aws-cdk, infrastructure-as-code, end-of-life [View on SkillFed](https://skillfed.io/packages/aws-cdk-aws-s3-assets) · [View on PyPI](https://pypi.org/project/aws-cdk-aws-s3-assets/)