--- id: aws-cdk-aws-s3-deployment version: "1.204.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.aws-s3-deployment — Constructs for deploying contents to S3 buckets License: permissive · Maintenance: active · Downloads: 145.6K/mo ## What it is and what it does This package provides a CDK construct that automates uploading and synchronizing file contents to S3 buckets during infrastructure deployment. It accepts sources from local directories, local zip files, other S3 buckets, or inline string/JSON data, and uses a Lambda-backed custom CloudFormation resource to extract and sync the files to a destination bucket with optional pruning and cache-control headers. The construct handles the intermediate steps of archiving, uploading to a staging assets bucket, and then deploying to the final destination—all declaratively within your CDK stack. It integrates with the broader AWS CDK ecosystem (aws-cdk.aws-s3, aws-cdk.aws-iam, aws-cdk.aws-lambda) and supports dependency ordering via `deployed_bucket` to ensure files are present before dependent resources are created. Use it for: - Deploy a static website (HTML, CSS, JS) from a local directory to an S3 bucket with web hosting enabled. - Populate an S3 bucket with application assets during stack deployment without manual upload steps. - Sync multiple source directories to the same bucket with different cache-control policies using multiple BucketDeployment constructs. - Reference deployed files in downstream CDK constructs by using `deployment.deployed_bucket` to enforce deployment ordering. - Deploy configuration or data files from version control to S3 as part of infrastructure provisioning. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Deploys files and directories to AWS S3 buckets as part of AWS CDK infrastructure code, handling zipping, uploading, and synchronization automatically. No—this package is part of AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer maintained. Users should migrate to AWS CDK v2 instead. If you are already on CDK v1 and cannot migrate immediately, it is functional but carries the risk of unpatched vulnerabilities and lack of ongoing support. ## Install pip install aws-cdk-aws-s3-deployment uv add aws-cdk-aws-s3-deployment poetry add aws-cdk-aws-s3-deployment ## Installing aws-cdk.aws-s3-deployment Before you install: Low install friction with pure Python wheels. However, this is AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer being updated; users should migrate to AWS CDK v2 instead. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions. Quickstart: pip install aws-cdk.aws-s3-deployment from aws_cdk import aws_s3 as s3 from aws_cdk.aws_s3_deployment import BucketDeployment, Source deployment = BucketDeployment(self, "DeployWebsite", sources=[Source.asset("./website-dist")], destination_bucket=website_bucket ) Requires AWS CDK v1 environment and valid AWS credentials configured for deployment. Verify before relying: - Whether migration path and tooling from CDK v1 to v2 are straightforward for existing deployments. - Performance characteristics when deploying large numbers of files or multi-gigabyte archives. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 145.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags s3 bucket deployment cdk, upload files to s3 infrastructure, s3 sync cloudformation, aws cdk s3 content, bucket population automation, s3 asset deployment, infrastructure-as-code s3, aws-cdk, infrastructure-as-code, deprecated [View on SkillFed](https://skillfed.io/packages/aws-cdk-aws-s3-deployment) · [View on PyPI](https://pypi.org/project/aws-cdk-aws-s3-deployment/)