aws-cdk.aws-s3-deployment
Constructs for deploying contents to S3 buckets
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 on this page — 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
aws-cdk-aws-s3-deployment on PyPI
pip
pip install aws-cdk-aws-s3-deploymentuv
uv add aws-cdk-aws-s3-deploymentpoetry
poetry add aws-cdk-aws-s3-deploymentInstalling 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 the current Python release (~=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 14 — aws-cdk.aws-cloudfront, aws-cdk.aws-ec2, aws-cdk.aws-efs, aws-cdk.aws-iam, aws-cdk.aws-lambda, aws-cdk.aws-logs, aws-cdk.aws-s3-assets, aws-cdk.aws-s3, aws-cdk.core, aws-cdk.lambda-layer-awscli, constructs, jsii, publication, typeguard |
| Maintenance | actively maintained — 1,152 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 145,598/month — #11,123 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_cdk.aws_s3_deployment-1.204.0-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
aws-cdk.aws-s3-assetsPackages local files and directories for…
permissive · top 15,000 on PyPI
aws-cdk.aws-s3Defines AWS S3 buckets and related resources as…
permissive · top 15,000 on PyPI
git-remote-s3Enables Git to use Amazon S3 as a remote…
permissive · top 15,000 on PyPI
aws-cdk.cx-apiProvides the cloud executable protocol and…
permissive · top 15,000 on PyPI
aws-cdk.aws-cloudfrontDefines AWS CloudFront distributions and…
permissive · top 15,000 on PyPI
aws-cdk.aws-codebuildDefines AWS CodeBuild projects and build…
permissive · top 15,000 on PyPI
aws-cdk.aws-ecr-assetsBundles Docker images as AWS CDK assets,…
permissive · top 15,000 on PyPI
aws-cdk.coreProvides the core construct classes and stack…
permissive · top 15,000 on PyPI
cdk-ecr-deploymentA CDK construct that copies Docker images…
permissive · top 15,000 on PyPI
aws-cdk.cloud-assembly-schemaProvides the schema and structures for AWS CDK…
permissive · top 5,000 on PyPI