@aws-cdk/asset-awscli-v1 2.2.143 → 2.2.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +2 -2
- package/API.md +39 -0
- package/lib/layer.zip +0 -0
- package/package.json +3 -3
package/.jsii
CHANGED
package/API.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
# Asset with AWS CLI v1
|
|
2
|
+
<!--BEGIN STABILITY BANNER-->
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!--END STABILITY BANNER-->
|
|
11
|
+
|
|
12
|
+
This module bundles the AWS CLI v1 as a local asset. It exposes
|
|
13
|
+
constants `ASSET_FILE` and `LAYER_SOURCE_DIR` that can be consumed
|
|
14
|
+
via the CDK `Asset` construct.
|
|
15
|
+
|
|
16
|
+
Any Lambda Function that uses uses this asset must use a Python 3.x
|
|
17
|
+
runtime.
|
|
18
|
+
|
|
19
|
+
Usage:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// AwsCliLayer bundles the AWS CLI in a lambda layer
|
|
23
|
+
import { ASSET_FILE, LAYER_SOURCE_DIR } from '@aws-cdk/asset-awscli-v1';
|
|
24
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
25
|
+
import * as s3_assets from 'aws-cdk-lib/aws-s3-assets';
|
|
26
|
+
import { FileSystem } from 'aws-cdk-lib';
|
|
27
|
+
|
|
28
|
+
declare const fn: lambda.Function;
|
|
29
|
+
const asset = new s3_assets.Asset(this, 'layer-asset', {
|
|
30
|
+
path: ASSET_FILE,
|
|
31
|
+
assetHash: FileSystem.fingerprint(LAYER_SOURCE_DIR),
|
|
32
|
+
});
|
|
33
|
+
fn.addLayers(new lambda.LayerVersion(this, 'AwsCliLayer', {
|
|
34
|
+
code: lambda.Code.fromBucket(asset.bucket, asset.s3ObjectKey),
|
|
35
|
+
}));
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The CLI will be installed under `/opt/awscli/aws`.
|
|
39
|
+
|
|
1
40
|
# API Reference <a name="API Reference" id="api-reference"></a>
|
|
2
41
|
|
|
3
42
|
|
package/lib/layer.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"jest-junit": "^15",
|
|
59
59
|
"jsii": "1.x",
|
|
60
60
|
"jsii-diff": "^1.80.0",
|
|
61
|
-
"jsii-docgen": "^7.1
|
|
61
|
+
"jsii-docgen": "^7.2.1",
|
|
62
62
|
"jsii-pacmak": "^1.80.0",
|
|
63
63
|
"npm-check-updates": "^16",
|
|
64
|
-
"projen": "^0.71.
|
|
64
|
+
"projen": "^0.71.16",
|
|
65
65
|
"standard-version": "^9",
|
|
66
66
|
"ts-jest": "^27",
|
|
67
67
|
"ts-node": "^10.9.1",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"version": "2.2.
|
|
83
|
+
"version": "2.2.145",
|
|
84
84
|
"jest": {
|
|
85
85
|
"testMatch": [
|
|
86
86
|
"<rootDir>/src/**/__tests__/**/*.ts?(x)",
|