Skip to content

Commit 7fa461c

Browse files
committed
fix(docs): make the Lambda Layer version consistent
1 parent fcb4086 commit 7fa461c

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

docs/index.md

+30-30
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverles
2626

2727
You can install Powertools for AWS Lambda (Python) using one of the following options:
2828

29-
* **Lambda Layer (x86_64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53**](# "Replace {region} with your AWS region, e.g., eu-west-1"){: .copyMe}:clipboard:
29+
* **Lambda Layer (x86_64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54**](# "Replace {region} with your AWS region, e.g., eu-west-1"){: .copyMe}:clipboard:
3030
* **Lambda Layer (arm64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:53**](# "Replace {region} with your AWS region, e.g., eu-west-1"){: .copyMe}:clipboard:
3131
* **Pip**: **[`pip install "aws-lambda-powertools"`](#){: .copyMe}:clipboard:**
3232

@@ -80,34 +80,34 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
8080

8181
| Region | Layer ARN |
8282
| ---------------- | ---------------------------------------------------------------------------------------------------------- |
83-
| `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
84-
| `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
85-
| `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
86-
| `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
87-
| `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
88-
| `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
83+
| `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
84+
| `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
85+
| `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
86+
| `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
87+
| `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
88+
| `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
8989
| `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
90-
| `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
91-
| `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
92-
| `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
90+
| `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
91+
| `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
92+
| `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
9393
| `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
94-
| `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
95-
| `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
94+
| `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
95+
| `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
9696
| `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
97-
| `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
98-
| `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
97+
| `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
98+
| `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
9999
| `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
100-
| `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
101-
| `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
102-
| `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
100+
| `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
101+
| `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
102+
| `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
103103
| `il-central-1` | [arn:aws:lambda:il-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
104104
| `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
105-
| `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
106-
| `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
107-
| `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
108-
| `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
109-
| `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
110-
| `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:53](#){: .copyMe}:clipboard: |
105+
| `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
106+
| `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
107+
| `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
108+
| `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
109+
| `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
110+
| `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:54](#){: .copyMe}:clipboard: |
111111

112112
=== "arm64"
113113

@@ -152,7 +152,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
152152
Type: AWS::Serverless::Function
153153
Properties:
154154
Layers:
155-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
155+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
156156
```
157157

158158
=== "Serverless framework"
@@ -162,7 +162,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
162162
hello:
163163
handler: lambda_function.lambda_handler
164164
layers:
165-
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
165+
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
166166
```
167167

168168
=== "CDK"
@@ -178,7 +178,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
178178
powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn(
179179
self,
180180
id="lambda-powertools",
181-
layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53"
181+
layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54"
182182
)
183183
aws_lambda.Function(self,
184184
'sample-app-lambda',
@@ -227,7 +227,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
227227
role = aws_iam_role.iam_for_lambda.arn
228228
handler = "index.test"
229229
runtime = "python3.9"
230-
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53"]
230+
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54"]
231231

232232
source_code_hash = filebase64sha256("lambda_function_payload.zip")
233233
}
@@ -280,7 +280,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
280280
? Do you want to configure advanced settings? Yes
281281
...
282282
? Do you want to enable Lambda layers for this function? Yes
283-
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
283+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
284284
❯ amplify push -y
285285

286286

@@ -291,7 +291,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
291291
- Name: <NAME-OF-FUNCTION>
292292
? Which setting do you want to update? Lambda layers configuration
293293
? Do you want to enable Lambda layers for this function? Yes
294-
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
294+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
295295
? Do you want to edit the local lambda function now? No
296296
```
297297

@@ -457,7 +457,7 @@ You can include Powertools for AWS Lambda (Python) Lambda Layer using [AWS Lambd
457457
Change {region} to your AWS region, e.g. `eu-west-1`
458458

459459
```bash title="AWS CLI"
460-
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53 --region {region}
460+
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54 --region {region}
461461
```
462462

463463
The pre-signed URL to download this Lambda Layer will be within `Location` key.

examples/logger/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Globals:
1414
Layers:
1515
# Find the latest Layer version in the official documentation
1616
# https://docs.powertools.aws.dev/lambda/python/latest/#lambda-layer
17-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
17+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
1818

1919
Resources:
2020
LoggerLambdaHandlerExample:

examples/metrics/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Globals:
1515
Layers:
1616
# Find the latest Layer version in the official documentation
1717
# https://docs.powertools.aws.dev/lambda/python/latest/#lambda-layer
18-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
18+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
1919

2020
Resources:
2121
CaptureLambdaHandlerExample:

examples/tracer/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Globals:
1313
Layers:
1414
# Find the latest Layer version in the official documentation
1515
# https://docs.powertools.aws.dev/lambda/python/latest/#lambda-layer
16-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:53
16+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:54
1717

1818
Resources:
1919
CaptureLambdaHandlerExample:

layer/scripts/layer-balancer/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"log"
88
"net/http"
99
"os"
@@ -197,7 +197,7 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
197197
LayerName: aws.String(layer.Name),
198198
Principal: aws.String("*"),
199199
StatementId: aws.String("PublicLayerAccess"),
200-
VersionNumber: layerVersionResponse.Version,
200+
VersionNumber: &layerVersionResponse.Version,
201201
})
202202
if err != nil {
203203
return fmt.Errorf("error making layer public: %w", err)
@@ -260,7 +260,7 @@ func downloadCanonicalLayerZip(ctx context.Context, layer *LayerInfo) ([]byte, e
260260
// Gets the Layer content URL from S3
261261
getLayerVersionResult, err := lambdaSvc.GetLayerVersion(ctx, &lambda.GetLayerVersionInput{
262262
LayerName: aws.String(layer.Name),
263-
VersionNumber: version,
263+
VersionNumber: &version,
264264
})
265265
if err != nil {
266266
innerErr = fmt.Errorf("error getting eu-central-1 layer download URL: %w", err)
@@ -275,7 +275,7 @@ func downloadCanonicalLayerZip(ctx context.Context, layer *LayerInfo) ([]byte, e
275275
}
276276
defer resp.Body.Close()
277277

278-
body, err := ioutil.ReadAll(resp.Body)
278+
body, err := io.ReadAll(resp.Body)
279279
if err != nil {
280280
innerErr = err
281281
}

0 commit comments

Comments
 (0)