@@ -26,7 +26,7 @@ You can use Powertools in both TypeScript and JavaScript code bases.
26
26
27
27
Powertools is available in the following formats:
28
28
29
- * ** Lambda Layer** : [ ** arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7 ** ] ( # ) {: .copyMe}:clipboard :
29
+ * ** Lambda Layer** : [ ** arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8 ** ] ( # ) {: .copyMe}:clipboard :
30
30
* ** npm** : ** ` npm install @aws-lambda-powertools/tracer @aws-lambda-powertools/metrics @aws-lambda-powertools/logger ` **
31
31
32
32
### Lambda Layer
@@ -37,25 +37,33 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
37
37
38
38
??? note "Note: Click to expand and copy any regional Lambda Layer ARN"
39
39
40
- | Region | Layer ARN |
40
+ | Region | Layer ARN |
41
41
| ---------------- | ----------------------------------------------------------------------------------------------------------- |
42
- | `us-east-1` | [arn:aws:lambda:us-east-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
43
- | `us-east-2` | [arn:aws:lambda:us-east-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
44
- | `us-west-1` | [arn:aws:lambda:us-west-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
45
- | `us-west-2` | [arn:aws:lambda:us-west-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
46
- | `ap-south-1` | [arn:aws:lambda:ap-south-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
47
- | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
48
- | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
49
- | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
50
- | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
51
- | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
52
- | `eu-central-1` | [arn:aws:lambda:eu-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
53
- | `eu-west-1` | [arn:aws:lambda:eu-west-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
54
- | `eu-west-2` | [arn:aws:lambda:eu-west-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
55
- | `eu-west-3` | [arn:aws:lambda:eu-west-3:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
56
- | `eu-north-1` | [arn:aws:lambda:eu-north-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
57
- | `ca-central-1` | [arn:aws:lambda:ca-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
58
- | `sa-east-1` | [arn:aws:lambda:sa-east-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:7](#){: .copyMe}:clipboard: |
42
+ | `us-east-1` | [arn:aws:lambda:us-east-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
43
+ | `us-east-2` | [arn:aws:lambda:us-east-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
44
+ | `us-west-1` | [arn:aws:lambda:us-west-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
45
+ | `us-west-2` | [arn:aws:lambda:us-west-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
46
+ | `ap-south-1` | [arn:aws:lambda:ap-south-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
47
+ | `ap-east-1` | [arn:aws:lambda:ap-east-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
48
+ | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
49
+ | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
50
+ | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
51
+ | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
52
+ | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
53
+ | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
54
+ | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
55
+ | `eu-central-1` | [arn:aws:lambda:eu-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
56
+ | `eu-central-2` | [arn:aws:lambda:eu-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
57
+ | `eu-west-1` | [arn:aws:lambda:eu-west-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
58
+ | `eu-west-2` | [arn:aws:lambda:eu-west-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
59
+ | `eu-west-3` | [arn:aws:lambda:eu-west-3:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
60
+ | `eu-north-1` | [arn:aws:lambda:eu-north-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
61
+ | `eu-south-1` | [arn:aws:lambda:eu-south-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
62
+ | `eu-south-2` | [arn:aws:lambda:eu-south-2:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
63
+ | `ca-central-1` | [arn:aws:lambda:ca-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
64
+ | `sa-east-1` | [arn:aws:lambda:sa-east-1:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
65
+ | `af-south-1` | [arn:aws:lambda:af-south-11:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
66
+ | `me-south-1` | [arn:aws:lambda:me-south-11:094274105915:layer:AWSLambdaPowertoolsTypeScript:8](#){: .copyMe}:clipboard: |
59
67
60
68
??? note "Note: Click to expand and copy code snippets for popular frameworks"
61
69
@@ -66,7 +74,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
66
74
Type: AWS::Serverless::Function
67
75
Properties:
68
76
Layers:
69
- - !Sub arn:aws:lambda:${AWS::Region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7
77
+ - !Sub arn:aws:lambda:${AWS::Region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8
70
78
```
71
79
72
80
If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer:
@@ -97,7 +105,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
97
105
hello:
98
106
handler: lambda_function.lambda_handler
99
107
layers:
100
- - arn:aws:lambda:${aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7
108
+ - arn:aws:lambda:${aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8
101
109
```
102
110
103
111
If you use `esbuild` to bundle your code, make sure to exclude `@aws-lambda-powertools` from being bundled since the packages will be already present the Layer:
@@ -129,7 +137,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
129
137
const powertoolsLayer = lambda.LayerVersion.fromLayerVersionArn(
130
138
this,
131
139
'PowertoolsLayer',
132
- `arn:aws:lambda:${cdk.Stack.of(this).region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7 `
140
+ `arn:aws:lambda:${cdk.Stack.of(this).region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8 `
133
141
);
134
142
135
143
new lambda.Function(this, 'Function', {
@@ -181,7 +189,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
181
189
role = ...
182
190
handler = "index.handler"
183
191
runtime = "nodejs16.x"
184
- layers = ["arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7 "]
192
+ layers = ["arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8 "]
185
193
source_code_hash = filebase64sha256("lambda_function_payload.zip")
186
194
}
187
195
```
@@ -199,7 +207,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
199
207
200
208
const lambdaFunction = new aws.lambda.Function("function", {
201
209
layers: [
202
- pulumi.interpolate`arn:aws:lambda:${aws.getRegionOutput().name}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7 `
210
+ pulumi.interpolate`arn:aws:lambda:${aws.getRegionOutput().name}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8 `
203
211
],
204
212
code: new pulumi.asset.FileArchive("lambda_function_payload.zip"),
205
213
tracingConfig: {
@@ -223,7 +231,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
223
231
? Do you want to configure advanced settings? Yes
224
232
...
225
233
? Do you want to enable Lambda layers for this function? Yes
226
- ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7
234
+ ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8
227
235
❯ amplify push -y
228
236
229
237
# Updating an existing function and add the layer
@@ -233,13 +241,13 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
233
241
- Name: <NAME-OF-FUNCTION>
234
242
? Which setting do you want to update? Lambda layers configuration
235
243
? Do you want to enable Lambda layers for this function? Yes
236
- ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7
244
+ ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8
237
245
? Do you want to edit the local lambda function now? No
238
246
```
239
247
240
248
=== "Get the Layer .zip contents"
241
249
```bash title="AWS CLI"
242
- aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:7 --region {region}
250
+ aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScript:8 --region {region}
243
251
```
244
252
245
253
The pre-signed URL to download this Lambda Layer will be within `Location` key.
0 commit comments