net6.0
An Asset construct that contains the AWS CLI, for use in Lambda Layers (Stability: Stable)
Published
Oct 9, 2026
10d ago
Total Downloads
86.4K
86,398
Install
dotnet add package Amazon.CDK.Asset.AwsCliV2 --version 2.0.196
| Product | Versions |
|---|---|
| .NET |
README
Asset with AWS CLI v2
This library is currently under development. Do not use!
This module exports a single class called AwsCliAsset which is an s3_assets.Asset that bundles the AWS CLI v2.
Usage:
// AwsCliLayer bundles the AWS CLI in a lambda layer
using Amazon.CDK.Asset.AwsCliV2;
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.AWS.S3.Assets;
using Amazon.CDK;
Function fn;
var awscli = new AwsCliAsset(this, "AwsCliCode");
fn.AddLayers(new LayerVersion(this, "AwsCliLayer", new LayerVersionProps {
Code = Code.FromBucket(awscli.Bucket, awscli.S3ObjectKey)
}));
The CLI will be installed under /opt/awscli/aws.
Changes from Previous Version
No structural changes between v2.0.195 and v2.0.196.
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.