@Stability(Stable)
Package software.amazon.awscdk.cdk.asset.awscli.v2
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:
// Example automatically generated from non-compiling source. May contain errors.
// AwsCliLayer bundles the AWS CLI in a lambda layer
import aws.cdk.asset.awscli.v2.AwsCliAsset;
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.services.s3.assets.*;
import software.amazon.awscdk.FileSystem;
Function fn;
Object awscli = new AwsCliAsset(this, "AwsCliCode");
fn.addLayers(LayerVersion.Builder.create(this, "AwsCliLayer")
.code(Code.fromBucket(awscli.getBucket(), awscli.getS3ObjectKey()))
.build());
The CLI will be installed under /opt/awscli/aws.
-
Class Summary Class Description AwsCliAsset A CDK Asset construct that contains the AWS CLI.