aws-cdk.asset-awscli-v1
A library that contains the AWS CLI for use in Lambda Layers
What it is and what it does
This package provides a pre-built AWS CLI v1 asset designed to be consumed by AWS CDK constructs, specifically for use in Lambda Layers. It exposes two constants—ASSET_FILE and LAYER_SOURCE_DIR—that point to the bundled CLI and its source directory, allowing developers to easily add AWS CLI functionality to Lambda functions without manually packaging the CLI themselves.
The asset installs the CLI under /opt/awscli/aws within the Lambda layer, making it available to Lambda functions at runtime. It's built for modern Python versions (3.10 through 3.14) and integrates directly with CDK's Asset and LayerVersion constructs, reducing boilerplate and ensuring consistent CLI packaging across CDK-based infrastructure projects.
Use it for:
- Add AWS CLI v1 to Lambda functions that need to invoke AWS services directly during execution
- Build Lambda layers that share a consistent AWS CLI version across multiple functions in a CDK stack
- Simplify packaging of CLI-dependent Lambda code by using pre-built, versioned assets instead of custom layers
- Ensure reproducible Lambda deployments by pinning a specific AWS CLI v1 version through CDK asset management
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Bundles AWS CLI v1 as a reusable asset for AWS CDK Lambda Layers, exposing constants for asset file paths and layer source directories.
Yes, if you are using AWS CDK to manage Lambda functions that require AWS CLI v1. The package is actively maintained, has low install friction, and eliminates manual CLI packaging. Not necessary if your Lambda functions do not need CLI access or if you prefer AWS CLI v2.
Install
aws-cdk-asset-awscli-v1 on PyPI
pip
pip install aws-cdk-asset-awscli-v1uv
uv add aws-cdk-asset-awscli-v1poetry
poetry add aws-cdk-asset-awscli-v1Installing aws-cdk.asset-awscli-v1
Before you install
Active maintenance with a recent release (4 days old). Low install friction with only two runtime dependencies (jsii and publication). Supports Python 3.10 through 3.14.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
import { ASSET_FILE, LAYER_SOURCE_DIR } from 'aws-cdk-asset-awscli-v1';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as s3_assets from 'aws-cdk-lib/aws-s3-assets';
import { FileSystem } from 'aws-cdk-lib';
const asset = new s3_assets.Asset(this, 'layer-asset', {
path: ASSET_FILE,
assetHash: FileSystem.fingerprint(LAYER_SOURCE_DIR),
});
fn.addLayers(new lambda.LayerVersion(this, 'AwsCliLayer', {
code: lambda.Code.fromBucket(asset.bucket, asset.s3ObjectKey),
}));
Lambda functions using this asset must use a Python 3.x runtime; requires AWS CDK and aws-cdk-lib installed.
Verify before relying
- Whether AWS CLI v1 receives security updates or is in maintenance-only mode
- Performance impact of bundling CLI v1 in Lambda layers relative to alternative approaches
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — jsii, publication |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,104,828/month — #1,416 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_cdk_asset_awscli_v1-2.2.293-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.asset-node-proxy-agent-v6Bundles the NPM proxy-agent package (version…
permissive · top 5,000 on PyPI
aws-cdk.asset-node-proxy-agent-v5Bundles the NPM proxy-agent package as an AWS…
permissive · top 15,000 on PyPI
aws-cdk.asset-kubectl-v20Provides a Lambda Layer containing kubectl…
permissive · top 5,000 on PyPI
aws-cdk.lambda-layer-kubectl-v35Provides a Lambda Layer packaging kubectl…
permissive · top 15,000 on PyPI
aws-cdk.aws-s3-assetsPackages local files and directories for…
permissive · top 15,000 on PyPI
aws-cdk.aws-lambdaDefines AWS Lambda functions and layers as…
permissive · top 15,000 on PyPI
aws-cdk.aws-lambda-python-alphaProvides AWS CDK constructs for defining,…
permissive · top 5,000 on PyPI
aws-cdk.aws-imagebuilderProvides AWS CDK L1 constructs for defining and…
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.aws-autoscaling-commonProvides shared internal implementation details…
permissive · top 15,000 on PyPI