@@ -15,7 +15,7 @@ A suite of utilities for AWS Lambda functions to ease adopting best practices su
15
15
16
16
Powertools is available in the following formats:
17
17
18
- * ** Lambda Layer** : [ ** arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:21 ** ] ( # ) {: .copyMe}:clipboard :
18
+ * ** Lambda Layer** : [ ** arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:22 ** ] ( # ) {: .copyMe}:clipboard :
19
19
* ** PyPi** : ** ` pip install aws-lambda-powertools ` **
20
20
21
21
???+ hint "Support this project by using Lambda Layers :heart : "
@@ -33,23 +33,23 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
33
33
34
34
| Region | Layer ARN |
35
35
| ---------------- | -------------------------------------------------------------------------------------------------------- |
36
- | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
37
- | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
38
- | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
39
- | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
40
- | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
41
- | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
42
- | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
43
- | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
44
- | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
45
- | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
46
- | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
47
- | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
48
- | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
49
- | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
50
- | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
51
- | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
52
- | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPython:21 ](#){: .copyMe}:clipboard: |
36
+ | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
37
+ | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
38
+ | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
39
+ | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
40
+ | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
41
+ | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
42
+ | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
43
+ | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
44
+ | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
45
+ | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
46
+ | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
47
+ | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
48
+ | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
49
+ | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
50
+ | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
51
+ | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
52
+ | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPython:22 ](#){: .copyMe}:clipboard: |
53
53
54
54
??? question "Can't find our Lambda Layer for your preferred AWS region?"
55
55
You can use [ Serverless Application Repository (SAR)] ( #sar ) method, our [ CDK Layer Construct] ( https://github.com/aws-samples/cdk-lambda-powertools-python-layer ) {target="_ blank"}, or PyPi like you normally would for any other library.
@@ -63,7 +63,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
63
63
Type: AWS::Serverless::Function
64
64
Properties:
65
65
Layers:
66
- - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:21
66
+ - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:22
67
67
```
68
68
69
69
=== "Serverless framework"
@@ -73,7 +73,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
73
73
hello:
74
74
handler: lambda_function.lambda_handler
75
75
layers:
76
- - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPython:21
76
+ - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPython:22
77
77
```
78
78
79
79
=== "CDK"
@@ -89,7 +89,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
89
89
powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn(
90
90
self,
91
91
id="lambda-powertools",
92
- layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPython:21 "
92
+ layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPython:22 "
93
93
)
94
94
aws_lambda.Function(self,
95
95
'sample-app-lambda',
@@ -138,7 +138,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
138
138
role = aws_iam_role.iam_for_lambda.arn
139
139
handler = "index.test"
140
140
runtime = "python3.9"
141
- layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:21 "]
141
+ layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:22 "]
142
142
143
143
source_code_hash = filebase64sha256("lambda_function_payload.zip")
144
144
}
@@ -157,7 +157,7 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
157
157
? Do you want to configure advanced settings? Yes
158
158
...
159
159
? Do you want to enable Lambda layers for this function? Yes
160
- ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:21
160
+ ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:22
161
161
❯ amplify push -y
162
162
163
163
@@ -168,15 +168,15 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
168
168
- Name: <NAME-OF-FUNCTION>
169
169
? Which setting do you want to update? Lambda layers configuration
170
170
? Do you want to enable Lambda layers for this function? Yes
171
- ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:21
171
+ ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPython:22
172
172
? Do you want to edit the local lambda function now? No
173
173
```
174
174
175
175
=== "Get the Layer .zip contents"
176
176
Change {region} to your AWS region, e.g. ` eu-west-1 `
177
177
178
178
```bash title="AWS CLI"
179
- aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:21 --region {region}
179
+ aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPython:22 --region {region}
180
180
```
181
181
182
182
The pre-signed URL to download this Lambda Layer will be within `Location` key.
@@ -214,7 +214,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
214
214
Properties:
215
215
Location:
216
216
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
217
- SemanticVersion: 1.25.10 # change to latest semantic version available in SAR
217
+ SemanticVersion: 1.26.3 # change to latest semantic version available in SAR
218
218
219
219
MyLambdaFunction:
220
220
Type: AWS::Serverless::Function
@@ -242,7 +242,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
242
242
Location:
243
243
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
244
244
# Find latest from github.com/awslabs/aws-lambda-powertools-python/releases
245
- SemanticVersion: 1.25.10
245
+ SemanticVersion: 1.26.3
246
246
```
247
247
248
248
=== "CDK"
@@ -252,7 +252,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
252
252
253
253
POWERTOOLS_BASE_NAME = 'AWSLambdaPowertools'
254
254
# Find latest from github.com/awslabs/aws-lambda-powertools-python/releases
255
- POWERTOOLS_VER = '1.23.0 '
255
+ POWERTOOLS_VER = '1.26.3 '
256
256
POWERTOOLS_ARN = 'arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer'
257
257
258
258
class SampleApp(core.Construct):
@@ -316,7 +316,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
316
316
317
317
variable "aws_powertools_version" {
318
318
type = string
319
- default = "1.20.2 "
319
+ default = "1.26.3 "
320
320
description = "The AWS Powertools release version"
321
321
}
322
322
0 commit comments