skillfed

aws-cdk.aws-s3-deployment

Constructs for deploying contents to S3 buckets

aws-cdk-aws-s3-deployment v1.204.0 145.6K downloads/30d#11,123 on PyPI12,868
Permissive license Apache-2.0 Active released

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-deployment

uv

uv add aws-cdk-aws-s3-deployment

poetry

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 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

Development Status :: 7 - InactiveFramework :: AWS CDKFramework :: AWS CDK :: 1Intended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed

Tags

s3 bucket deployment cdkupload files to s3 infrastructures3 sync cloudformationaws cdk s3 contentbucket population automations3 asset deploymentinfrastructure-as-code s3
aws-cdkinfrastructure-as-codedeprecated

More Build Tools packages