Amazon.CDK.Asset.AwsCliV1
v2.2.296Latest Stable
net6.0
A library that contains the AWS CLI for use in Lambda Layers (Stability: Stable)
Published
Oct 26, 2026
19d ago
Total Downloads
14.1M
14,149,500
Install
dotnet add package Amazon.CDK.Asset.AwsCliV1 --version 2.2.296
| Product | Versions |
|---|---|
| .NET |
README
Asset with AWS CLI v1
This module bundles the AWS CLI v1 as a local asset. It exposes
constants ASSET_FILE and LAYER_SOURCE_DIR that can be consumed
via the CDK Asset construct.
Any Lambda Function that uses uses this asset must use a Python 3.x runtime.
Usage:
// AwsCliLayer bundles the AWS CLI in a lambda layer
using Aws.Cdk.Asset.Awscli.V1;
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.AWS.S3.Assets;
using Amazon.CDK;
Function fn;
var asset = new Asset(this, "layer-asset", new AssetProps {
Path = ASSET_FILE,
AssetHash = FileSystem.Fingerprint(LAYER_SOURCE_DIR)
});
fn.AddLayers(new LayerVersion(this, "AwsCliLayer", new LayerVersionProps {
Code = Code.FromBucket(asset.Bucket, asset.S3ObjectKey)
}));
The CLI will be installed under /opt/awscli/aws.
Changes from Previous Version
No structural changes between v2.2.295 and v2.2.296.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.