Skip to content

Commit 93c5183

Browse files
Addressing Heitor's feedback
1 parent 1f82706 commit 93c5183

28 files changed

+355
-347
lines changed

docs/automation.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -99,40 +99,46 @@ Next, we deploy these CDK Assets to the beta account across all AWS regions. Onc
9999

100100
```mermaid
101101
graph LR
102-
A[Fetch PyPi release] --> P38[Python 3.8]
103-
A --> P39[Python 3.9]
104-
A --> P310[Python 3.10]
105-
A --> P311[Python 3.11]
106-
A --> P312[Python 3.12]
107-
P38 --> P38x86[build x86_64]
108-
P38 --> P38arm64[build arm64]
109-
P39 --> P39x86[build x86_64]
110-
P39 --> P39arm64[build arm64]
111-
P310 --> P310x86[build x86_64]
112-
P310 --> P310arm64[build arm64]
113-
P311 --> P311x86[build x86_64]
114-
P311 --> P311arm64[build arm64]
115-
P312 --> P312x86[build x86_64]
116-
P312 --> P312arm64[build arm64]
117-
P38x86 --> CDKP1[CDK Asset with both Stacks]
118-
P38arm64 --> CDKP1[CDK Asset with both Stacks]
119-
P39x86 --> CDKP2[CDK Asset with both Stacks]
120-
P39arm64 --> CDKP2[CDK Asset with both Stacks]
121-
P310x86 --> CDKP3[CDK Asset with both Stacks]
122-
P310arm64 --> CDKP3[CDK Asset with both Stacks]
123-
P311x86 --> CDKP4[CDK Asset with both Stacks]
124-
P311arm64 --> CDKP4[CDK Asset with both Stacks]
125-
P312x86 --> CDKP5[CDK Asset with both Stacks]
126-
P312arm64 --> CDKP5[CDK Asset with both Stacks]
127-
CDKP1 --> DeployBeta[Deploy in the beta account<br>in every AWS Region]
128-
CDKP2 --> DeployBeta
129-
CDKP3 --> DeployBeta
130-
CDKP4 --> DeployBeta
131-
CDKP5 --> DeployBeta
132-
DeployBeta --> RunCanary[Perform canary tests<br>on all platforms, runtimes and regions]
133-
RunCanary --> DeployBetaSuccess{Success?}
134-
DeployBetaSuccess -- Yes --> DeployProd[Deploy the previous<br>CDK Asset in the prod account<br>in every AWS Region]
135-
DeployBetaSuccess -- No --> PipelineStop[Stop the pipeline]
102+
Fetch[Fetch PyPi release] --> P38[<strong>Python 3.8</strong>]
103+
Fetch --> P39[<strong>Python 3.9</strong>]
104+
Fetch --> P310[<strong>Python 3.10</strong>]
105+
Fetch --> P311[<strong>Python 3.11</strong>]
106+
Fetch --> P312[<strong>Python 3.12</strong>]
107+
108+
subgraph build ["LAYER BUILD"]
109+
P38 --> P38x86[build x86_64]
110+
P38 --> P38arm64[build arm64]
111+
112+
P39 --> P39x86[build x86_64]
113+
P39 --> P39arm64[build arm64]
114+
P310 --> P310x86[build x86_64]
115+
P310 --> P310arm64[build arm64]
116+
P311 --> P311x86[build x86_64]
117+
P311 --> P311arm64[build arm64]
118+
P312 --> P312x86[build x86_64]
119+
P312 --> P312arm64[build arm64]
120+
P38x86 --> CDKP1[CDK Asset]
121+
P38arm64 --> CDKP1[CDK Asset]
122+
P39x86 --> CDKP2[CDK Asset]
123+
P39arm64 --> CDKP2[CDK Asset]
124+
P310x86 --> CDKP3[CDK Asset]
125+
P310arm64 --> CDKP3[CDK Asset]
126+
P311x86 --> CDKP4[CDK Asset]
127+
P311arm64 --> CDKP4[CDK Asset]
128+
P312x86 --> CDKP5[CDK Asset]
129+
P312arm64 --> CDKP5[CDK Asset]
130+
end
131+
132+
subgraph beta ["BETA (all regions)"]
133+
CDKP1 --> DeployBeta[Deploy to Beta]
134+
CDKP2 --> DeployBeta
135+
CDKP3 --> DeployBeta
136+
CDKP4 --> DeployBeta
137+
CDKP5 --> DeployBeta
138+
DeployBeta --> RunBetaCanary["Beta canary tests<br> <i>(all assets)</i>"]
139+
end
140+
subgraph prod ["PROD (all regions)"]
141+
RunBetaCanary---|<strong>If successful</strong>|DeployProd[Deploy to Prod]
142+
DeployProd --> RunProdCanary["Prod canary tests<br> <i>(all assets)</i>"]
143+
end
136144
```
137-
138-
!!! info "More details to come"

docs/includes/_layer_homepage_arm64.md

Lines changed: 135 additions & 135 deletions
Large diffs are not rendered by default.

docs/includes/_layer_homepage_x86.md

Lines changed: 145 additions & 145 deletions
Large diffs are not rendered by default.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ In this context, `[aws-sdk]` is an alias to the `boto3` package. Due to dependen
180180
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.
181181

182182
```bash title="AWS CLI command to download Lambda Layer content"
183-
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-312:1 --region eu-west-1
183+
aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1 --region eu-west-1
184184
```
185185

186186
#### SAR

examples/homepage/install/arm64/amplify.txt

Lines changed: 2 additions & 2 deletions
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-Arm64-312:69
9+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64: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-Arm64-312:69
20+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:1
2121
? Do you want to edit the local lambda function now? No

examples/homepage/install/arm64/cdk_arm64.py

Lines changed: 1 addition & 1 deletion
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-Arm64-312:1",
13+
layer_version_arn=f"arn:aws:lambda:{Aws.REGION}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:1",
1414
)
1515
aws_lambda.Function(
1616
self,

examples/homepage/install/arm64/pulumi_arm64.py

Lines changed: 1 addition & 1 deletion
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-Arm64-312:69",
25+
":017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:1",
2626
),
2727
],
2828
tracing_config={"mode": "Active"},

examples/homepage/install/arm64/sam.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Resources:
99
Runtime: python3.12
1010
Handler: app.lambda_handler
1111
Layers:
12-
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-Arm64-312:1
12+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:1

examples/homepage/install/arm64/serverless.yml

Lines changed: 1 addition & 1 deletion
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-Arm64-312:1
13+
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:1

examples/homepage/install/arm64/terraform.tf

Lines changed: 1 addition & 1 deletion
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-Arm64-312:69"]
37+
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:1"]
3838
architectures = ["arm64"]
3939

4040
source_code_hash = filebase64sha256("lambda_function_payload.zip")

examples/homepage/install/sar/cdk_sar.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
POWERTOOLS_BASE_NAME = "AWSLambdaPowertools"
55
# Find latest from github.com/aws-powertools/powertools-lambda-python/releases
66
POWERTOOLS_VER = "2.37.0"
7-
POWERTOOLS_ARN = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer"
7+
POWERTOOLS_ARN = (
8+
"arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86"
9+
)
810

911

1012
class SampleApp(Stack):

examples/homepage/install/sar/sam.yaml

Lines changed: 2 additions & 2 deletions
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
9+
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86
1010
SemanticVersion: 2.0.0 # change to latest semantic version available in SAR
1111

1212
MyLambdaFunction:
@@ -16,4 +16,4 @@ Resources:
1616
Handler: app.lambda_handler
1717
Layers:
1818
# fetch Layer ARN from SAR App stack output
19-
- !GetAtt AwsLambdaPowertoolsPythonLayer.Outputs.LayerVersionArn
19+
- !GetAtt AwsLambdaPowertoolsPythonLayer.Outputs.LayerVersionArn

examples/homepage/install/sar/scoped_down_iam.yaml

Lines changed: 2 additions & 2 deletions
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
36+
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86
3737
- Sid: S3AccessLayer
3838
Effect: Allow
3939
Action:
@@ -52,4 +52,4 @@
5252
Resource:
5353
- !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:aws-lambda-powertools-python-layer*
5454
Roles:
55-
- Ref: "PowertoolsLayerIamRole"
55+
- Ref: "PowertoolsLayerIamRole"

examples/homepage/install/sar/serverless.yml

Lines changed: 2 additions & 2 deletions
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
20-
SemanticVersion: 2.0.0
19+
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86
20+
SemanticVersion: 2.0.0

examples/homepage/install/sar/terraform.tf

Lines changed: 2 additions & 2 deletions
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"
24+
application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v3-python312-x86"
2525
semantic_version = var.aws_powertools_version
2626
}
2727

@@ -38,4 +38,4 @@ output "deployed_powertools_sar_version" {
3838
# Fetch Powertools for AWS Lambda (Python) Layer ARN from deployed SAR App
3939
output "aws_lambda_powertools_layer_arn" {
4040
value = aws_serverlessapplicationrepository_cloudformation_stack.deploy_sar_stack.outputs.LayerVersionArn
41-
}
41+
}

examples/homepage/install/x86_64/amplify.txt

Lines changed: 2 additions & 2 deletions
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-312:69
9+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86: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-312:69
20+
? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
2121
? Do you want to edit the local lambda function now? No

examples/homepage/install/x86_64/cdk_x86.py

Lines changed: 1 addition & 1 deletion
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-312:1",
13+
layer_version_arn=f"arn:aws:lambda:{Aws.REGION}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1",
1414
)
1515
aws_lambda.Function(
1616
self,

examples/homepage/install/x86_64/pulumi_x86.py

Lines changed: 1 addition & 1 deletion
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-312:1",
25+
":017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1",
2626
),
2727
],
2828
tracing_config={"mode": "Active"},

examples/homepage/install/x86_64/sam.yaml

Lines changed: 1 addition & 1 deletion
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-312:1
11+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1

examples/homepage/install/x86_64/serverless.yml

Lines changed: 1 addition & 1 deletion
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-312:1
13+
- arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1

examples/homepage/install/x86_64/terraform.tf

Lines changed: 1 addition & 1 deletion
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-312:1"]
37+
layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1"]
3838

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

examples/logger/sam/template.yaml

Lines changed: 1 addition & 1 deletion
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-312:71
17+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
1818

1919
Resources:
2020
LoggerLambdaHandlerExample:

examples/metrics/sam/template.yaml

Lines changed: 1 addition & 1 deletion
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-312:1
18+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
1919

2020
Resources:
2121
CaptureLambdaHandlerExample:

examples/metrics_datadog/sam/template.yaml

Lines changed: 1 addition & 1 deletion
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-312:1
23+
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:1
2424
# Find the latest Layer version in the Datadog official documentation
2525

2626
# Datadog SDK

examples/tracer/sam/template.yaml

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

1818
Resources:
1919
CaptureLambdaHandlerExample:

layer/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "aws-lambda-powertools-python-layer"
33
version = "1.1.0"
44
description = "Powertools for AWS Lambda (Python) Lambda Layers"
5-
authors = ["DevAx <aws-devax-open-source@amazon.com>"]
5+
authors = ["Powertools for AWS Maintainers <aws-powertools-maintainers@amazon.com>"]
66

77
license = "MIT"
88
[tool.poetry.dependencies]

layer_v3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To build the layer construct you need to provide the Powertools for AWS Lambda (
99
You can pass it as a context variable when running `synth` or `deploy`,
1010

1111
```shell
12-
cdk synth --context version=1.25.1
12+
cdk synth --context version=3.0.0 --pythonVersion=3.12
1313
```
1414

1515
## Canary stack

layer_v3/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "aws-lambda-powertools-python-layer"
33
version = "1.1.0"
44
description = "Powertools for AWS Lambda (Python) Lambda Layers"
5-
authors = ["DevAx <aws-devax-open-source@amazon.com>"]
5+
authors = ["Powertools for AWS Maintainers <aws-powertools-maintainers@amazon.com>"]
66

77
license = "MIT"
88
[tool.poetry.dependencies]

0 commit comments

Comments
 (0)