Skip to main content

An Asset construct that contains the AWS CLI, for use in Lambda Layers

Project description

Asset with AWS CLI v1

---

cdk-constructs: Stable


This module exports a single class called AwsCliAsset which is an s3_assets.Asset that bundles the AWS CLI v1.

Any Lambda Function that uses a LayerVersion created from this Asset must use a Python 3.x runtime.

Usage:

// AwsCliLayer bundles the AWS CLI in a lambda layer
import { AwsCliAsset } from '@aws-cdk/asset-awscli-v1';

declare const fn: lambda.Function;
const awscli = new AwsCliAsset(this, 'AwsCliCode');
fn.addLayers(new lambda.LayerVersion(this, 'AwsCliLayer', {
  code: lambda.Code.fromBucket(awscli.bucket, awscli.s3ObjectKey),
}));

The CLI will be installed under /opt/awscli/aws.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk.asset-awscli-v1-2.1.24.tar.gz (13.4 MB view hashes)

Uploaded Source

Built Distribution

aws_cdk.asset_awscli_v1-2.1.24-py3-none-any.whl (13.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page