--- id: aws-cdk-asset-awscli-v1 version: "2.2.293" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.asset-awscli-v1 — A library that contains the AWS CLI for use in Lambda Layers License: permissive · Maintenance: active · Downloads: 11.1M/mo ## 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 above — 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 pip install aws-cdk-asset-awscli-v1 uv add aws-cdk-asset-awscli-v1 poetry add aws-cdk-asset-awscli-v1 ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 11.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags aws cli lambda layer, cdk lambda asset bundling, aws cli v1 asset, lambda layer aws cli, cdk asset construction, aws-cdk, lambda-layer, infrastructure-as-code [View on SkillFed](https://skillfed.io/packages/aws-cdk-asset-awscli-v1) · [View on PyPI](https://pypi.org/project/aws-cdk-asset-awscli-v1/)