Skip to content

Commit 727bac1

Browse files
fix(layers): rename Lambda layer name from x86 to x86_64 (#5226)
fix: update singular x86 references to x86_64 Co-authored-by: Leandro Damascena <[email protected]>
1 parent 4c0bdf5 commit 727bac1

24 files changed

+175
-175
lines changed

.github/workflows/publish_v2_layer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy v2 layer to all regions
22

33
# PROCESS
44
#
5-
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for x86 and ARM (uses custom runner as it's CPU heavy)
5+
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for x86_64 and ARM (uses custom runner as it's CPU heavy)
66
# 2. Kick off pipeline for beta, prod, and canary releases
77
# 3. Create PR to update trunk so staged docs also point to the latest Layer ARN, when merged
88
# 4. Builds and publishes docs with latest Layer ARN using given version (generally coming from release)

.github/workflows/publish_v3_layer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy v3 layer to all regions
22

33
# PROCESS
44
#
5-
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for Python3.8-3.12 and x86/ARM architectures (uses custom runner as it's CPU heavy)
5+
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for Python3.8-3.12 and x86_64/ARM architectures (uses custom runner as it's CPU heavy)
66
# 2. Kick off pipeline for beta, prod, and canary releases
77
# 3. Create PR to update trunk so staged docs also point to the latest Layer ARN, when merged
88
# 4. Builds and publishes docs with latest Layer ARN using given version (generally coming from release)

docs/diagram_src/cicd_steps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ timeline
8383
: Create PR
8484
8585
Lambda Layers : Fetch PyPi release
86-
: Build x86 architecture
86+
: Build x86_64 architecture
8787
: Build ARM architecture
8888
: Deploy Beta
8989
: Canary testing

docs/includes/_layer_homepage_x86.md

+145-145
Large diffs are not rendered by default.

docs/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You can install Powertools for AWS Lambda (Python) using your favorite dependenc
6969

7070
| Architecture | Layer ARN |
7171
| ------------ | --------------------------------------------------------------------------------------------------------- |
72-
| x86 | __arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86:1__{: .copyMe}:clipboard: |
72+
| x86_64 | __arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86_64:1__{: .copyMe}:clipboard: |
7373
| ARM | __arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:1__{: .copyMe}:clipboard: |
7474

7575
=== "AWS Console"
@@ -166,7 +166,7 @@ You can install Powertools for AWS Lambda (Python) using your favorite dependenc
166166
You can use AWS CLI to generate a pre-signed URL to download the contents of our Lambda Layer.
167167

168168
```bash title="AWS CLI command to download Lambda Layer content"
169-
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1 --region eu-west-1
169+
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1 --region eu-west-1
170170
```
171171

172172
You'll find the pre-signed URL under `Location` key as part of the CLI command output.
@@ -247,7 +247,7 @@ In this context, `[aws-sdk]` is an alias to the `boto3` package. Due to dependen
247247

248248
### Lambda Layer
249249

250-
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install) for Python versions from **3.8 to 3.12**, as well as for both **arm64 and x86** architectures, to ensure compatibility. We also remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-layer-cdk/blob/d24716744f7d1f37617b4998c992c4c067e19e64/layer/Python/Dockerfile#L36){target="_blank"} to achieve the most optimal size.
250+
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install) for Python versions from **3.8 to 3.12**, as well as for both **arm64 and x86_64** architectures, to ensure compatibility. We also remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-layer-cdk/blob/d24716744f7d1f37617b4998c992c4c067e19e64/layer/Python/Dockerfile#L36){target="_blank"} to achieve the most optimal size.
251251

252252
=== "x86_64"
253253
--8<-- "docs/includes/_layer_homepage_x86.md"
@@ -260,7 +260,7 @@ In this context, `[aws-sdk]` is an alias to the `boto3` package. Due to dependen
260260
The pre-signed URL to download this Lambda Layer will be within `Location` key in the CLI output. The CLI output will also contain the Powertools for AWS Lambda version it contains.
261261

262262
```bash title="AWS CLI command to download Lambda Layer content"
263-
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1 --region eu-west-1
263+
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1 --region eu-west-1
264264
```
265265

266266
#### SAR
@@ -489,7 +489,7 @@ Knowing which companies are using this library is important to help prioritize t
489489

490490
<!-- markdownlint-disable MD051 -->
491491

492-
When [using Layers](#lambda-layer), you can add Powertools for AWS Lambda (Python) as a dev dependency to not impact the development process. For Layers, we pre-package all dependencies, compile and optimize for storage and both x86 and ARM architecture.
492+
When [using Layers](#lambda-layer), you can add Powertools for AWS Lambda (Python) as a dev dependency to not impact the development process. For Layers, we pre-package all dependencies, compile and optimize for storage and both x86_64 and ARM architecture.
493493

494494
<!-- markdownlint-enable MD051 -->
495495

docs/maintainers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ section Git release
206206
Upload attestation : active, 8s
207207
208208
section Layer release
209-
Build (x86+ARM) : active, layer_build, 10:08, 6m
209+
Build (x86_64+ARM) : active, layer_build, 10:08, 6m
210210
Deploy Beta : active, layer_beta, after layer_build, 6.3m
211211
Deploy Prod : active, layer_prod, after layer_beta, 6.3m
212212

docs/roadmap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ AWS Lambda will officially block updates to Lambda functions using Python 3.7 su
248248
249249
We want to publish a JSON with a map of region and Lambda Layer ARN as a GitHub Release Note asset.
250250

251-
As of V2, we prioritize Lambda Layers being available before release notes are out. This is due to X86 and ARM64 compilation for smaller binaries and extra speed.
251+
As of V2, we prioritize Lambda Layers being available before release notes are out. This is due to x86_64 and ARM64 compilation for smaller binaries and extra speed.
252252

253253
This means we have room to include a JSON map for Lambda Layers and facilitate automation for customers wanting the latest version as soon as it's available.
254254

examples/homepage/install/sar/cdk_sar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Find latest from github.com/aws-powertools/powertools-lambda-python/releases
66
POWERTOOLS_VER = "3.0.0"
77
POWERTOOLS_ARN = (
8-
"arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86"
8+
"arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86_64"
99
)
1010

1111

examples/homepage/install/sar/sam.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: AWS::Serverless::Application
77
Properties:
88
Location:
9-
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86
9+
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86_64
1010
SemanticVersion: 3.0.0 # change to latest semantic version available in SAR
1111

1212
MyLambdaFunction:

examples/homepage/install/sar/scoped_down_iam.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
- serverlessrepo:GetCloudFormationTemplate
3434
Resource:
3535
# this is arn of the Powertools for AWS Lambda (Python) SAR app
36-
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86
36+
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86_64
3737
- Sid: S3AccessLayer
3838
Effect: Allow
3939
Action:

examples/homepage/install/sar/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ resources:
1616
Type: AWS::Serverless::Application
1717
Properties:
1818
Location:
19-
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86
19+
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86_64
2020
SemanticVersion: 2.0.0

examples/homepage/install/sar/terraform.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "aws_serverlessapplicationrepository_cloudformation_stack" "deploy_sar_
2121
}
2222

2323
data "aws_serverlessapplicationrepository_application" "sar_app" {
24-
application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86"
24+
application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86_64"
2525
semantic_version = var.aws_powertools_version
2626
}
2727

examples/homepage/install/x86_64/amplify.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
? Do you want to configure advanced settings? Yes
77
...
88
? Do you want to enable Lambda layers for this function? Yes
9-
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
9+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1
1010
❯ amplify push -y
1111

1212

@@ -17,5 +17,5 @@ General information
1717
- Name: <NAME-OF-FUNCTION>
1818
? Which setting do you want to update? Lambda layers configuration
1919
? Do you want to enable Lambda layers for this function? Yes
20-
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
20+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1
2121
? Do you want to edit the local lambda function now? No

examples/homepage/install/x86_64/cdk_x86.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
1010
powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn(
1111
self,
1212
id="lambda-powertools",
13-
layer_version_arn=f"arn:aws:lambda:{Aws.REGION}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1",
13+
layer_version_arn=f"arn:aws:lambda:{Aws.REGION}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1",
1414
)
1515
aws_lambda.Function(
1616
self,

examples/homepage/install/x86_64/pulumi_x86.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
pulumi.Output.concat(
2323
"arn:aws:lambda:",
2424
aws.get_region_output().name,
25-
":017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1",
25+
":017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1",
2626
),
2727
],
2828
tracing_config={"mode": "Active"},

examples/homepage/install/x86_64/sam.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Resources:
88
Runtime: python3.12
99
Handler: app.lambda_handler
1010
Layers:
11-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
11+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1

examples/homepage/install/x86_64/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ functions:
1010
handler: lambda_function.lambda_handler
1111
architecture: arm64
1212
layers:
13-
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
13+
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1

examples/homepage/install/x86_64/terraform.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "aws_lambda_function" "test_lambda" {
3434
role = aws_iam_role.iam_for_lambda.arn
3535
handler = "index.test"
3636
runtime = "python3.12"
37-
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1"]
37+
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1"]
3838

3939
source_code_hash = filebase64sha256("lambda_function_payload.zip")
4040
}

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:AWSLambdaPowertoolsPythonV3-python312-x86:1
17+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1
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:AWSLambdaPowertoolsPythonV3-python312-x86:1
18+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1
1919

2020
Resources:
2121
CaptureLambdaHandlerExample:

examples/metrics_datadog/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Globals:
2020
Layers:
2121
# Find the latest Layer version in the official documentation
2222
# https://docs.powertools.aws.dev/lambda/python/latest/#lambda-layer
23-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
23+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1
2424
# Find the latest Layer version in the Datadog official documentation
2525

2626
# Datadog SDK

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:AWSLambdaPowertoolsPythonV3-python312-x86:1
16+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:1
1717

1818
Resources:
1919
CaptureLambdaHandlerExample:

layer_v3/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
POWERTOOLS_VERSION: str = app.node.try_get_context("version")
1111
PYTHON_VERSION: str = app.node.try_get_context("pythonVersion")
1212
PYTHON_VERSION_NORMALIZED = PYTHON_VERSION.replace(".", "")
13-
SSM_PARAM_LAYER_ARN: str = f"/layers/powertools-layer-v3-{PYTHON_VERSION_NORMALIZED}-x86-arn"
13+
SSM_PARAM_LAYER_ARN: str = f"/layers/powertools-layer-v3-{PYTHON_VERSION_NORMALIZED}-x86_64-arn"
1414
SSM_PARAM_LAYER_ARM64_ARN: str = f"/layers/powertools-layer-v3-{PYTHON_VERSION_NORMALIZED}-arm64-arn"
1515

1616
# Validate context variables

layer_v3/layer/layer_stack.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(
8080
super().__init__(scope, construct_id, **kwargs)
8181

8282
python_version_normalized = python_version.replace(".", "")
83-
layer_name_x86 = f"AWSLambdaPowertoolsPythonV3-{python_version_normalized}-x86"
83+
layer_name_x86_64 = f"AWSLambdaPowertoolsPythonV3-{python_version_normalized}-x86_64"
8484
layer_name_arm64 = f"AWSLambdaPowertoolsPythonV3-{python_version_normalized}-arm64"
8585

8686
if python_version == "python3.8":
@@ -119,7 +119,7 @@ def __init__(
119119
layer_single = Layer(
120120
self,
121121
f"LayerSingle-{python_version_normalized}",
122-
layer_version_name=layer_name_x86,
122+
layer_version_name=layer_name_x86_64,
123123
python_version=python_version,
124124
powertools_version=powertools_version,
125125
)
@@ -142,7 +142,7 @@ def __init__(
142142
layer = Layer(
143143
self,
144144
f"Layer-{python_version_normalized}",
145-
layer_version_name=layer_name_x86,
145+
layer_version_name=layer_name_x86_64,
146146
powertools_version=powertools_version,
147147
python_version=python_version,
148148
architecture=Architecture.X86_64,

0 commit comments

Comments
 (0)