From 52b15547d291a52bb13c04d0f7202a6486f8678d Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 13:24:21 +0200 Subject: [PATCH 01/22] chore(ci): add support for x86-64 regions only (#2122) --- .../reusable_deploy_v2_layer_stack.yml | 86 +++++++--- layer/app.py | 2 +- layer/layer/canary_stack.py | 49 +++++- layer/layer/layer_stack.py | 161 ++++++++++++++---- layer/poetry.lock | 160 +++++++---------- layer/pyproject.toml | 2 +- 6 files changed, 303 insertions(+), 157 deletions(-) diff --git a/.github/workflows/reusable_deploy_v2_layer_stack.yml b/.github/workflows/reusable_deploy_v2_layer_stack.yml index 0365f98b01d..f4b4fe73f24 100644 --- a/.github/workflows/reusable_deploy_v2_layer_stack.yml +++ b/.github/workflows/reusable_deploy_v2_layer_stack.yml @@ -34,31 +34,63 @@ jobs: strategy: fail-fast: false matrix: - region: - [ - "af-south-1", - "eu-central-1", - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "ap-east-1", - "ap-south-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-southeast-1", - "ap-southeast-2", - "ca-central-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "eu-south-1", - "eu-north-1", - "sa-east-1", - "ap-southeast-3", - "ap-northeast-3", - "me-south-1", - ] + # To get a list of current regions, use: + # aws ec2 describe-regions --all-regions --query "Regions[].RegionName" --output text | tr "\t" "\n" | sort + include: + - region: "af-south-1" + has_arm64_support: "true" + - region: "ap-east-1" + has_arm64_support: "true" + - region: "ap-northeast-1" + has_arm64_support: "true" + - region: "ap-northeast-2" + has_arm64_support: "true" + - region: "ap-northeast-3" + has_arm64_support: "true" + - region: "ap-south-1" + has_arm64_support: "true" + - region: "ap-south-2" + has_arm64_support: "false" + - region: "ap-southeast-1" + has_arm64_support: "true" + - region: "ap-southeast-2" + has_arm64_support: "true" + - region: "ap-southeast-3" + has_arm64_support: "true" + - region: "ap-southeast-4" + has_arm64_support: "false" + - region: "ca-central-1" + has_arm64_support: "true" + - region: "eu-central-1" + has_arm64_support: "true" + - region: "eu-central-2" + has_arm64_support: "false" + - region: "eu-north-1" + has_arm64_support: "true" + - region: "eu-south-1" + has_arm64_support: "true" + - region: "eu-south-2" + has_arm64_support: "false" + - region: "eu-west-1" + has_arm64_support: "true" + - region: "eu-west-2" + has_arm64_support: "true" + - region: "eu-west-3" + has_arm64_support: "true" + - region: "me-central-1" + has_arm64_support: "false" + - region: "me-south-1" + has_arm64_support: "true" + - region: "sa-east-1" + has_arm64_support: "true" + - region: "us-east-1" + has_arm64_support: "true" + - region: "us-east-2" + has_arm64_support: "true" + - region: "us-west-1" + has_arm64_support: "true" + - region: "us-west-2" + has_arm64_support: "true" steps: - name: checkout uses: actions/checkout@v3 @@ -99,7 +131,7 @@ jobs: - name: unzip artefact run: unzip cdk.out.zip - name: CDK Deploy Layer - run: npx cdk deploy --app cdk.out --context region=${{ matrix.region }} 'LayerV2Stack' --require-approval never --verbose --outputs-file cdk-outputs.json + run: npx cdk deploy --app cdk.out --context region=${{ matrix.region }} --parameters HasARM64Support=${{ matrix.has_arm64_support }} 'LayerV2Stack' --require-approval never --verbose --outputs-file cdk-outputs.json - name: Store latest Layer ARN if: ${{ inputs.stage == 'PROD' }} run: | @@ -116,7 +148,7 @@ jobs: if-no-files-found: error retention-days: 1 - name: CDK Deploy Canary - run: npx cdk deploy --app cdk.out --context region=${{ matrix.region}} --parameters DeployStage="${{ inputs.stage }}" 'CanaryV2Stack' --require-approval never --verbose + run: npx cdk deploy --app cdk.out --context region=${{ matrix.region }} --parameters DeployStage="${{ inputs.stage }}" --parameters HasARM64Support=${{ matrix.has_arm64_support }} 'CanaryV2Stack' --require-approval never --verbose update_v2_layer_arn_docs: needs: deploy-cdk-stack diff --git a/layer/app.py b/layer/app.py index 59a35dfd300..f9d0f778df0 100644 --- a/layer/app.py +++ b/layer/app.py @@ -21,7 +21,7 @@ app, "LayerV2Stack", powertools_version=POWERTOOLS_VERSION, - ssm_paramter_layer_arn=SSM_PARAM_LAYER_ARN, + ssm_parameter_layer_arn=SSM_PARAM_LAYER_ARN, ssm_parameter_layer_arm64_arn=SSM_PARAM_LAYER_ARM64_ARN, ) diff --git a/layer/layer/canary_stack.py b/layer/layer/canary_stack.py index fda9ebff3ad..e7034439063 100644 --- a/layer/layer/canary_stack.py +++ b/layer/layer/canary_stack.py @@ -1,7 +1,24 @@ import uuid -from aws_cdk import CfnParameter, CustomResource, Duration, Stack -from aws_cdk.aws_iam import Effect, ManagedPolicy, PolicyStatement, Role, ServicePrincipal +import jsii +from aws_cdk import ( + Aspects, + CfnCondition, + CfnParameter, + CfnResource, + CustomResource, + Duration, + Fn, + IAspect, + Stack, +) +from aws_cdk.aws_iam import ( + Effect, + ManagedPolicy, + PolicyStatement, + Role, + ServicePrincipal, +) from aws_cdk.aws_lambda import Architecture, Code, Function, LayerVersion, Runtime from aws_cdk.aws_logs import RetentionDays from aws_cdk.aws_ssm import StringParameter @@ -13,6 +30,16 @@ ) +@jsii.implements(IAspect) +class ApplyCondition: + def __init__(self, condition: CfnCondition): + self.condition = condition + + def visit(self, node): + if isinstance(node, CfnResource): + node.cfn_options.condition = self.condition + + class CanaryStack(Stack): def __init__( self, @@ -29,6 +56,20 @@ def __init__( self, "DeployStage", description="Deployment stage for canary" ).value_as_string + has_arm64_support = CfnParameter( + self, + "HasARM64Support", + description="Has ARM64 Support Condition", + type="String", + allowed_values=["true", "false"], + ) + + has_arm64_condition = CfnCondition( + self, + "HasARM64SupportCondition", + expression=Fn.condition_equals(has_arm64_support, "true"), + ) + layer_arn = StringParameter.from_string_parameter_attributes( self, "LayerVersionArnParam", parameter_name=ssm_paramter_layer_arn ).string_value @@ -46,7 +87,8 @@ def __init__( "LayerArm64VersionArnParam", parameter_name=ssm_parameter_layer_arm64_arn, ).string_value - Canary( + + arm64_canary = Canary( self, "Canary-arm64", layer_arn=layer_arm64_arn, @@ -54,6 +96,7 @@ def __init__( architecture=Architecture.ARM_64, stage=deploy_stage, ) + Aspects.of(arm64_canary).add(ApplyCondition(has_arm64_condition)) class Canary(Construct): diff --git a/layer/layer/layer_stack.py b/layer/layer/layer_stack.py index 6a92e1fa408..48c526be5e2 100644 --- a/layer/layer/layer_stack.py +++ b/layer/layer/layer_stack.py @@ -1,18 +1,43 @@ -from aws_cdk import CfnOutput, RemovalPolicy, Stack +from typing import Optional + +import jsii +from aws_cdk import ( + Aspects, + CfnCondition, + CfnOutput, + CfnParameter, + CfnResource, + Fn, + IAspect, + RemovalPolicy, + Stack, +) from aws_cdk.aws_lambda import Architecture, CfnLayerVersionPermission from aws_cdk.aws_ssm import StringParameter from cdk_aws_lambda_powertools_layer import LambdaPowertoolsLayer from constructs import Construct -class LayerStack(Stack): +@jsii.implements(IAspect) +class ApplyCondition: + def __init__(self, condition: CfnCondition): + self.condition = condition + + def visit(self, node): + if isinstance(node, CfnResource): + node.cfn_options.condition = self.condition + if isinstance(node, CfnOutput): + node.condition = self.condition + + +class Layer(Construct): def __init__( self, scope: Construct, construct_id: str, + layer_version_name: str, powertools_version: str, - ssm_paramter_layer_arn: str, - ssm_parameter_layer_arm64_arn: str, + architecture: Optional[Architecture] = None, **kwargs ) -> None: super().__init__(scope, construct_id, **kwargs) @@ -20,20 +45,14 @@ def __init__( layer = LambdaPowertoolsLayer( self, "Layer", - layer_version_name="AWSLambdaPowertoolsPythonV2", + layer_version_name=layer_version_name, version=powertools_version, include_extras=True, - compatible_architectures=[Architecture.X86_64], + compatible_architectures=[architecture] if architecture else [], ) + layer.apply_removal_policy(RemovalPolicy.RETAIN) - layer_arm64 = LambdaPowertoolsLayer( - self, - "Layer-ARM64", - layer_version_name="AWSLambdaPowertoolsPythonV2-Arm64", - version=powertools_version, - include_extras=True, - compatible_architectures=[Architecture.ARM_64], - ) + self.layer_version_arn = layer.layer_version_arn layer_permission = CfnLayerVersionPermission( self, @@ -42,33 +61,115 @@ def __init__( layer_version_arn=layer.layer_version_arn, principal="*", ) + layer_permission.apply_removal_policy(RemovalPolicy.RETAIN) + + +class LayerStack(Stack): + def __init__( + self, + scope: Construct, + construct_id: str, + powertools_version: str, + ssm_parameter_layer_arn: str, + ssm_parameter_layer_arm64_arn: str, + **kwargs + ) -> None: + super().__init__(scope, construct_id, **kwargs) - layer_permission_arm64 = CfnLayerVersionPermission( + has_arm64_support = CfnParameter( self, - "PublicLayerAccessArm64", - action="lambda:GetLayerVersion", - layer_version_arn=layer_arm64.layer_version_arn, - principal="*", + "HasARM64Suppor", + description="Has ARM64 Support Condition", + type="String", + allowed_values=["true", "false"], ) - layer_permission.apply_removal_policy(RemovalPolicy.RETAIN) - layer_permission_arm64.apply_removal_policy(RemovalPolicy.RETAIN) + has_arm64_condition = CfnCondition( + self, + "HasARM64SupportCondition", + expression=Fn.condition_equals(has_arm64_support, "true"), + ) + has_no_arm64_condition = CfnCondition( + self, + "HasNOArm64SupportCondition", + expression=Fn.condition_equals(has_arm64_support, "false"), + ) - layer.apply_removal_policy(RemovalPolicy.RETAIN) - layer_arm64.apply_removal_policy(RemovalPolicy.RETAIN) + # The following code is used when the region does not support ARM64 Lambdas. We make sure to only create the + # X86_64 Layer without specifying any compatible architecture, which would result in a CloudFormation error. - StringParameter( + layer_single = Layer( + self, + "LayerSingle", + layer_version_name="AWSLambdaPowertoolsPythonV2", + powertools_version=powertools_version, + ) + Aspects.of(layer_single).add(ApplyCondition(has_no_arm64_condition)) + + Aspects.of( + StringParameter( + self, + "SingleVersionArn", + parameter_name=ssm_parameter_layer_arn, + string_value=layer_single.layer_version_arn, + ) + ).add(ApplyCondition(has_no_arm64_condition)) + + # The following code is used when the region has support for ARM64 Lambdas. In this case, we explicitly + # create a Layer for both X86_64 and ARM64, specifying the compatible architectures. + + # X86_64 layer + + layer = Layer( + self, + "Layer", + layer_version_name="AWSLambdaPowertoolsPythonV2", + powertools_version=powertools_version, + architecture=Architecture.X86_64, + ) + Aspects.of(layer).add(ApplyCondition(has_arm64_condition)) + + Aspects.of( + StringParameter( + self, + "VersionArn", + parameter_name=ssm_parameter_layer_arn, + string_value=layer.layer_version_arn, + ) + ).add(ApplyCondition(has_arm64_condition)) + + CfnOutput( self, - "VersionArn", - parameter_name=ssm_paramter_layer_arn, - string_value=layer.layer_version_arn, + "LatestLayerArn", + value=Fn.condition_if( + has_arm64_condition.logical_id, + layer.layer_version_arn, + layer_single.layer_version_arn, + ).to_string(), ) + + # ARM64 layer + + layer_arm64 = Layer( + self, + "Layer-ARM64", + layer_version_name="AWSLambdaPowertoolsPythonV2-Arm64", + powertools_version=powertools_version, + architecture=Architecture.ARM_64, + ) + Aspects.of(layer_arm64).add(ApplyCondition(has_arm64_condition)) + StringParameter( self, "Arm64VersionArn", parameter_name=ssm_parameter_layer_arm64_arn, - string_value=layer_arm64.layer_version_arn, + string_value=Fn.condition_if( + has_arm64_condition.logical_id, + layer_arm64.layer_version_arn, + "none", + ).to_string(), ) - CfnOutput(self, "LatestLayerArn", value=layer.layer_version_arn) - CfnOutput(self, "LatestLayerArm64Arn", value=layer_arm64.layer_version_arn) + Aspects.of( + CfnOutput(self, "LatestLayerArm64Arn", value=layer_arm64.layer_version_arn) + ).add(ApplyCondition(has_arm64_condition)) diff --git a/layer/poetry.lock b/layer/poetry.lock index c7e991e3db9..39faf15d289 100644 --- a/layer/poetry.lock +++ b/layer/poetry.lock @@ -2,32 +2,33 @@ [[package]] name = "attrs" -version = "22.1.0" +version = "22.2.0" description = "Classes Without Boilerplate" category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, - {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, ] [package.extras] -dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] -docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] -tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] -tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] +cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] +tests = ["attrs[tests-no-zope]", "zope.interface"] +tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] [[package]] name = "aws-cdk-asset-awscli-v1" -version = "2.2.137" +version = "2.2.138" description = "A library that contains the AWS CLI for use in Lambda Layers" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.asset-awscli-v1-2.2.137.tar.gz", hash = "sha256:699e17416635f82d3a92ff5edc99725b4d473b1be2b22b38e060d4aa2153683e"}, - {file = "aws_cdk.asset_awscli_v1-2.2.137-py3-none-any.whl", hash = "sha256:cbd931a07c817c0cced3431a6d19f8169a7d95ec0dbb15d7b28ad8e11f3cdf1a"}, + {file = "aws-cdk.asset-awscli-v1-2.2.138.tar.gz", hash = "sha256:0a6880aa02399f74102e120aee96db75ec122a199b0735494c3dbcd09bd89c9c"}, + {file = "aws_cdk.asset_awscli_v1-2.2.138-py3-none-any.whl", hash = "sha256:d1f4e1b6a4bf5e9f1a7380a6141a3bf55d6fb6f1abfb0e1450bb258de3702f01"}, ] [package.dependencies] @@ -54,14 +55,14 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-asset-node-proxy-agent-v5" -version = "2.0.113" +version = "2.0.114" description = "@aws-cdk/asset-node-proxy-agent-v5" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.asset-node-proxy-agent-v5-2.0.113.tar.gz", hash = "sha256:bdd26ce3689940373af73739f01b8e4a12fb701a64976c30e2532d481e0e7b35"}, - {file = "aws_cdk.asset_node_proxy_agent_v5-2.0.113-py3-none-any.whl", hash = "sha256:179264ce2ad15fb4252995b2320f75ae1b3472881f1d5371137d4f6549137db8"}, + {file = "aws-cdk.asset-node-proxy-agent-v5-2.0.114.tar.gz", hash = "sha256:5f8a0ecb4128617ef8321dd1b3501b52e4a071e7481a7d1498775897299f7349"}, + {file = "aws_cdk.asset_node_proxy_agent_v5-2.0.114-py3-none-any.whl", hash = "sha256:3b034917bd15f84c710b031dbd29d7fbbb665ce16a609eaabd890fa47949df40"}, ] [package.dependencies] @@ -92,18 +93,18 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "boto3" -version = "1.24.89" +version = "1.26.112" description = "The AWS SDK for Python" category = "dev" optional = false python-versions = ">= 3.7" files = [ - {file = "boto3-1.24.89-py3-none-any.whl", hash = "sha256:346f8f0d101a4261dac146a959df18d024feda6431e1d9d84f94efd24d086cae"}, - {file = "boto3-1.24.89.tar.gz", hash = "sha256:d0d8ffcdc10821c4562bc7f935cdd840033bbc342ac0e14b6bdd348b3adf4c04"}, + {file = "boto3-1.26.112-py3-none-any.whl", hash = "sha256:03c2e1ddd29d993a6ab9b8a8fe184027957fc32bd405c496ad0c30311445925f"}, + {file = "boto3-1.26.112.tar.gz", hash = "sha256:4ea3319bba2e8ff7cd9560259ae64f073c7fb6312158aa375777687231cabe69"}, ] [package.dependencies] -botocore = ">=1.27.89,<1.28.0" +botocore = ">=1.29.112,<1.30.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.6.0,<0.7.0" @@ -112,14 +113,14 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.27.89" +version = "1.29.112" description = "Low-level, data-driven core of boto 3." category = "dev" optional = false python-versions = ">= 3.7" files = [ - {file = "botocore-1.27.89-py3-none-any.whl", hash = "sha256:238f1dfdb8d8d017c2aea082609a3764f3161d32745900f41bcdcf290d95a048"}, - {file = "botocore-1.27.89.tar.gz", hash = "sha256:621f5413be8f97712b7e36c1b075a8791d1d1b9971a7ee060cdcdf5e2debf6c1"}, + {file = "botocore-1.29.112-py3-none-any.whl", hash = "sha256:2cbaddb09b46dcb0a05490724d51acb224d3a8df433c347f995b4d78bfb02c8a"}, + {file = "botocore-1.29.112.tar.gz", hash = "sha256:1f52d9371d7b5ee30a53dcef7954c3cf22e04b131cfab5268035f3299ccde9e1"}, ] [package.dependencies] @@ -128,34 +129,34 @@ python-dateutil = ">=2.1,<3.0.0" urllib3 = ">=1.25.4,<1.27" [package.extras] -crt = ["awscrt (==0.14.0)"] +crt = ["awscrt (==0.16.9)"] [[package]] name = "cattrs" -version = "22.1.0" +version = "22.2.0" description = "Composable complex class support for attrs and dataclasses." category = "main" optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.7" files = [ - {file = "cattrs-22.1.0-py3-none-any.whl", hash = "sha256:d55c477b4672f93606e992049f15d526dc7867e6c756cd6256d4af92e2b1e364"}, - {file = "cattrs-22.1.0.tar.gz", hash = "sha256:94b67b64cf92c994f8784c40c082177dc916e0489a73a9a36b24eb18a9db40c6"}, + {file = "cattrs-22.2.0-py3-none-any.whl", hash = "sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21"}, + {file = "cattrs-22.2.0.tar.gz", hash = "sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d"}, ] [package.dependencies] attrs = ">=20" -exceptiongroup = {version = "*", markers = "python_version <= \"3.10\""} +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "cdk-aws-lambda-powertools-layer" -version = "3.3.1" +version = "3.4.0" description = "A lambda layer for AWS Powertools for python and typescript" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "cdk-aws-lambda-powertools-layer-3.3.1.tar.gz", hash = "sha256:6cc48ec407a351bed40af64fc810eb51c6b619baa66fe1d6457c1d5ba195a632"}, - {file = "cdk_aws_lambda_powertools_layer-3.3.1-py3-none-any.whl", hash = "sha256:9c050a8edf787538cd802cf67bfb5a6843c4b00e11584cfa5f9d359c8a46c946"}, + {file = "cdk-aws-lambda-powertools-layer-3.4.0.tar.gz", hash = "sha256:3d3e89cb3b0f201f6f96473208e66b18279688049317d9c9849584a03c5d54a0"}, + {file = "cdk_aws_lambda_powertools_layer-3.4.0-py3-none-any.whl", hash = "sha256:bb3c157de17d3fbdcbdc33e5ee967cc80606bbb7a14f46e4f1f6cc8c28db5c86"}, ] [package.dependencies] @@ -167,43 +168,43 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ - {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, - {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] [[package]] name = "constructs" -version = "10.1.128" +version = "10.1.309" description = "A programming model for software-defined state" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "constructs-10.1.128-py3-none-any.whl", hash = "sha256:d6fbc88de4c2517b59e28a9d0bc3663e75decbe3464030b5bc53809868b52c9e"}, - {file = "constructs-10.1.128.tar.gz", hash = "sha256:6789412823ae27b39f659537337f688a9d555cad5845d4b821c7be02a061be1e"}, + {file = "constructs-10.1.309-py3-none-any.whl", hash = "sha256:3127067e99151d1094b05443452bc9f84c685a719c00031c7b5e55e294e0deb7"}, + {file = "constructs-10.1.309.tar.gz", hash = "sha256:cbc36a68187d4c9dd33b46b87aac2dda469bfda95c37d4c198bd98911064dce8"}, ] [package.dependencies] -jsii = ">=1.69.0,<2.0.0" +jsii = ">=1.80.0,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" [[package]] name = "exceptiongroup" -version = "1.0.0rc9" +version = "1.1.1" description = "Backport of PEP 654 (exception groups)" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.0.0rc9-py3-none-any.whl", hash = "sha256:2e3c3fc1538a094aab74fad52d6c33fc94de3dfee3ee01f187c0e0c72aec5337"}, - {file = "exceptiongroup-1.0.0rc9.tar.gz", hash = "sha256:9086a4a21ef9b31c72181c77c040a074ba0889ee56a7b289ff0afb0d97655f96"}, + {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, + {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, ] [package.extras] @@ -230,14 +231,14 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec [[package]] name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" files = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] [[package]] @@ -275,19 +276,16 @@ typing-extensions = ">=3.7,<5.0" [[package]] name = "packaging" -version = "21.3" +version = "23.1" description = "Core utilities for Python packages" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" - [[package]] name = "pluggy" version = "1.0.0" @@ -316,56 +314,28 @@ files = [ {file = "publication-0.0.3.tar.gz", hash = "sha256:68416a0de76dddcdd2930d1c8ef853a743cc96c82416c4e4d3b5d901c6276dc4"}, ] -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - -[[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "dev" -optional = false -python-versions = ">=3.6.8" -files = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, -] - -[package.extras] -diagrams = ["jinja2", "railroad-diagrams"] - [[package]] name = "pytest" -version = "7.1.3" +version = "7.3.0" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.1.3-py3-none-any.whl", hash = "sha256:1377bda3466d70b55e3f5cecfa55bb7cfcf219c7964629b967c37cf0bda818b7"}, - {file = "pytest-7.1.3.tar.gz", hash = "sha256:4f365fec2dff9c1162f834d9f18af1ba13062db0c708bf7b946f8a5c76180c39"}, + {file = "pytest-7.3.0-py3-none-any.whl", hash = "sha256:933051fa1bfbd38a21e73c3960cebdad4cf59483ddba7696c48509727e17f201"}, + {file = "pytest-7.3.0.tar.gz", hash = "sha256:58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d"}, ] [package.dependencies] -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -tomli = ">=1.0.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "python-dateutil" @@ -442,26 +412,26 @@ test = ["mypy", "pytest", "typing-extensions"] [[package]] name = "typing-extensions" -version = "4.4.0" +version = "4.5.0" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, + {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, + {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, ] [[package]] name = "urllib3" -version = "1.26.12" +version = "1.26.15" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, - {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, + {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, + {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, ] [package.extras] @@ -488,4 +458,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "8e77638e46b8fc0affe4fc283c80bf17846ccdfd357832343bb9fc07f47a8f77" +content-hash = "ade085b1989174ee03e7f27a781b580e2f7199441da6d8f60b3bf7891f6ca66e" diff --git a/layer/pyproject.toml b/layer/pyproject.toml index 4c46e7b4412..5f10af27b94 100644 --- a/layer/pyproject.toml +++ b/layer/pyproject.toml @@ -7,7 +7,7 @@ license = "MIT" [tool.poetry.dependencies] python = "^3.9" -cdk-aws-lambda-powertools-layer = "^3.3.1" +cdk-aws-lambda-powertools-layer = "^3.4.0" [tool.poetry.dev-dependencies] pytest = "^7.1.2" From 77dd07e433f1b043f1c2e6210472264b89318994 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 13:35:29 +0200 Subject: [PATCH 02/22] fix(ci): typo --- layer/layer/layer_stack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layer/layer/layer_stack.py b/layer/layer/layer_stack.py index 48c526be5e2..a2a08437051 100644 --- a/layer/layer/layer_stack.py +++ b/layer/layer/layer_stack.py @@ -78,7 +78,7 @@ def __init__( has_arm64_support = CfnParameter( self, - "HasARM64Suppor", + "HasARM64Support", description="Has ARM64 Support Condition", type="String", allowed_values=["true", "false"], From cf3185cb8abe4ac08ea5c6855e95f3c33353f580 Mon Sep 17 00:00:00 2001 From: Release bot Date: Fri, 14 Apr 2023 11:50:16 +0000 Subject: [PATCH 03/22] chore: update v2 layer ARN on documentation --- docs/index.md | 118 +++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/docs/index.md b/docs/index.md index 9bd8295837b..d44c1dc40f2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,8 +26,8 @@ Powertools is a developer toolkit to implement Serverless best practices and inc You can install Powertools using one of the following options: -* **Lambda Layer (x86_64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:27**](#){: .copyMe}:clipboard: -* **Lambda Layer (arm64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27**](#){: .copyMe}:clipboard: +* **Lambda Layer (x86_64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28**](#){: .copyMe}:clipboard: +* **Lambda Layer (arm64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28**](#){: .copyMe}:clipboard: * **Pip**: **[`pip install "aws-lambda-powertools"`](#){: .copyMe}:clipboard:** ??? question "Using Pip? You might need to install additional dependencies." @@ -78,55 +78,55 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. | Region | Layer ARN | | ---------------- | ---------------------------------------------------------------------------------------------------------- | - | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | - | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:27](#){: .copyMe}:clipboard: | + | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | === "arm64" | Region | Layer ARN | | ---------------- | ---------------------------------------------------------------------------------------------------------------- | - | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | - | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27](#){: .copyMe}:clipboard: | + | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | ??? note "Note: Click to expand and copy code snippets for popular frameworks" @@ -139,7 +139,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. Type: AWS::Serverless::Function Properties: Layers: - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:27 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 ``` === "Serverless framework" @@ -149,7 +149,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. hello: handler: lambda_function.lambda_handler layers: - - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:27 + - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 ``` === "CDK" @@ -165,7 +165,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn( self, id="lambda-powertools", - layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:27" + layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28" ) aws_lambda.Function(self, 'sample-app-lambda', @@ -214,7 +214,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. role = aws_iam_role.iam_for_lambda.arn handler = "index.test" runtime = "python3.9" - layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:27"] + layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28"] source_code_hash = filebase64sha256("lambda_function_payload.zip") } @@ -267,7 +267,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. ? Do you want to configure advanced settings? Yes ... ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 ❯ amplify push -y @@ -278,7 +278,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. - Name: ? Which setting do you want to update? Lambda layers configuration ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:27 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 ? Do you want to edit the local lambda function now? No ``` @@ -292,7 +292,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. Properties: Architectures: [arm64] Layers: - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 ``` === "Serverless framework" @@ -303,7 +303,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. handler: lambda_function.lambda_handler architecture: arm64 layers: - - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27 + - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 ``` === "CDK" @@ -319,7 +319,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn( self, id="lambda-powertools", - layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27" + layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28" ) aws_lambda.Function(self, 'sample-app-lambda', @@ -369,7 +369,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. role = aws_iam_role.iam_for_lambda.arn handler = "index.test" runtime = "python3.9" - layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27"] + layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28"] architectures = ["arm64"] source_code_hash = filebase64sha256("lambda_function_payload.zip") @@ -425,7 +425,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. ? Do you want to configure advanced settings? Yes ... ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 ❯ amplify push -y @@ -436,7 +436,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. - Name: ? Which setting do you want to update? Lambda layers configuration ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:27 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 ? Do you want to edit the local lambda function now? No ``` @@ -444,7 +444,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. Change {region} to your AWS region, e.g. `eu-west-1` ```bash title="AWS CLI" - aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:27 --region {region} + aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 --region {region} ``` The pre-signed URL to download this Lambda Layer will be within `Location` key. From 7501dbf518c742647b9f229f71efaf3ee8a67ec8 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 15:32:54 +0200 Subject: [PATCH 04/22] chore(layer): change layer-balance script to support new regions --- layer/scripts/layer-balancer/go.mod | 1 + layer/scripts/layer-balancer/go.sum | 2 + layer/scripts/layer-balancer/main.go | 80 ++++++++++++++++++++-------- 3 files changed, 62 insertions(+), 21 deletions(-) diff --git a/layer/scripts/layer-balancer/go.mod b/layer/scripts/layer-balancer/go.mod index 219d4d46736..fba6faafc2f 100644 --- a/layer/scripts/layer-balancer/go.mod +++ b/layer/scripts/layer-balancer/go.mod @@ -21,4 +21,5 @@ require ( github.com/aws/aws-sdk-go-v2/service/sts v1.16.19 // indirect github.com/aws/smithy-go v1.13.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect ) diff --git a/layer/scripts/layer-balancer/go.sum b/layer/scripts/layer-balancer/go.sum index 9bcb7428e79..a23150519d8 100644 --- a/layer/scripts/layer-balancer/go.sum +++ b/layer/scripts/layer-balancer/go.sum @@ -31,6 +31,8 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/layer/scripts/layer-balancer/main.go b/layer/scripts/layer-balancer/main.go index 889675e5f71..cf2f0c1728e 100644 --- a/layer/scripts/layer-balancer/main.go +++ b/layer/scripts/layer-balancer/main.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/lambda" "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" ) @@ -44,27 +45,40 @@ var canonicalLayers = []LayerInfo{ // regions are the regions that we want to keep in sync var regions = []string{ "af-south-1", - "eu-central-1", - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", "ap-east-1", - "ap-south-1", "ap-northeast-1", "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-south-2", "ap-southeast-1", "ap-southeast-2", + "ap-southeast-3", + "ap-southeast-4", "ca-central-1", + "eu-central-1", + "eu-central-2", + "eu-north-1", + "eu-south-1", + "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", - "eu-south-1", - "eu-north-1", - "sa-east-1", - "ap-southeast-3", - "ap-northeast-3", + "me-central-1", "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", +} + +var singleArchitectureRegions = []string{ + "ap-south-2", + "ap-southeast-4", + "eu-central-2", + "eu-south-2", + "me-central-1", } // getLayerVersion returns the latest version of a layer in a region @@ -100,6 +114,11 @@ func getGreatestVersion(ctx context.Context) (int64, error) { layer := &canonicalLayers[idx] for _, region := range regions { + // Ignore regions that are excluded + if layer.Architecture == types.ArchitectureArm64 && slices.Contains(singleArchitectureRegions, region) { + continue + } + layerName := layer.Name ctx := ctx region := region @@ -149,16 +168,30 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo return fmt.Errorf("error downloading canonical zip: %w", err) } - layerVersionResponse, err := lambdaSvc.PublishLayerVersion(ctx, &lambda.PublishLayerVersionInput{ - Content: &types.LayerVersionContentInput{ - ZipFile: payload, - }, - LayerName: aws.String(layer.Name), - CompatibleArchitectures: []types.Architecture{layer.Architecture}, - CompatibleRuntimes: []types.Runtime{types.RuntimePython37, types.RuntimePython38, types.RuntimePython39}, - Description: aws.String(layer.Description), - LicenseInfo: aws.String("MIT-0"), - }) + var layerVersionResponse *lambda.PublishLayerVersionOutput + + if slices.Contains(singleArchitectureRegions, region) { + layerVersionResponse, err = lambdaSvc.PublishLayerVersion(ctx, &lambda.PublishLayerVersionInput{ + Content: &types.LayerVersionContentInput{ + ZipFile: payload, + }, + LayerName: aws.String(layer.Name), + CompatibleRuntimes: []types.Runtime{types.RuntimePython37, types.RuntimePython38, types.RuntimePython39}, + Description: aws.String(layer.Description), + LicenseInfo: aws.String("MIT-0"), + }) + } else { + layerVersionResponse, err = lambdaSvc.PublishLayerVersion(ctx, &lambda.PublishLayerVersionInput{ + Content: &types.LayerVersionContentInput{ + ZipFile: payload, + }, + LayerName: aws.String(layer.Name), + CompatibleArchitectures: []types.Architecture{layer.Architecture}, + CompatibleRuntimes: []types.Runtime{types.RuntimePython37, types.RuntimePython38, types.RuntimePython39}, + Description: aws.String(layer.Description), + LicenseInfo: aws.String("MIT-0"), + }) + } if err != nil { return fmt.Errorf("error publishing layer version: %w", err) } @@ -186,6 +219,11 @@ func balanceRegions(ctx context.Context, maxVersion int64) error { layer := &canonicalLayers[idx] for _, region := range regions { + // Ignore regions that are excluded + if layer.Architecture == types.ArchitectureArm64 && slices.Contains(singleArchitectureRegions, region) { + continue + } + ctx := ctx region := region layer := layer From ef3ebe20da2ef9cb64ee677a3ef839a919064b03 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 15:36:24 +0200 Subject: [PATCH 05/22] fix(docs): add Layer ARN for new 5 regions --- docs/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/index.md b/docs/index.md index d44c1dc40f2..6b0db547dea 100644 --- a/docs/index.md +++ b/docs/index.md @@ -84,16 +84,21 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | From 5e77874dfb25f330a5f4b58ab6928ad93362ad08 Mon Sep 17 00:00:00 2001 From: Release bot Date: Fri, 14 Apr 2023 13:37:05 +0000 Subject: [PATCH 06/22] update changelog with latest changes --- CHANGELOG.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34dd6ce6ec2..45f98298f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ ## Bug Fixes +* **ci:** typo +* **docs:** add Layer ARN for new 5 regions + +## Maintenance + +* update v2 layer ARN on documentation +* **ci:** add support for x86-64 regions only ([#2122](https://github.com/awslabs/aws-lambda-powertools-python/issues/2122)) +* **layer:** change layer-balance script to support new regions + + + +## [v2.13.0] - 2023-04-14 +## Bug Fixes + +* **ci:** replace the correct files for Layer ARN * **ci:** fix working directory * **ci:** add debug log to NPM install * **ci:** use project's CDK version when building layers @@ -19,13 +34,14 @@ ## Maintenance +* update v2 layer ARN on documentation * **ci:** bump the cdk-aws-lambda-powertools-layer version ([#2121](https://github.com/awslabs/aws-lambda-powertools-python/issues/2121)) * **deps:** bump codecov/codecov-action from 3.1.1 to 3.1.2 ([#2110](https://github.com/awslabs/aws-lambda-powertools-python/issues/2110)) -* **deps-dev:** bump flake8-comprehensions from 3.11.1 to 3.12.0 ([#2124](https://github.com/awslabs/aws-lambda-powertools-python/issues/2124)) +* **deps-dev:** bump httpx from 0.23.3 to 0.24.0 ([#2111](https://github.com/awslabs/aws-lambda-powertools-python/issues/2111)) * **deps-dev:** bump aws-cdk-lib from 2.73.0 to 2.74.0 ([#2123](https://github.com/awslabs/aws-lambda-powertools-python/issues/2123)) * **deps-dev:** bump mkdocs-material from 9.1.5 to 9.1.6 ([#2104](https://github.com/awslabs/aws-lambda-powertools-python/issues/2104)) * **deps-dev:** bump aws-cdk from 2.73.0 to 2.74.0 ([#2125](https://github.com/awslabs/aws-lambda-powertools-python/issues/2125)) -* **deps-dev:** bump httpx from 0.23.3 to 0.24.0 ([#2111](https://github.com/awslabs/aws-lambda-powertools-python/issues/2111)) +* **deps-dev:** bump flake8-comprehensions from 3.11.1 to 3.12.0 ([#2124](https://github.com/awslabs/aws-lambda-powertools-python/issues/2124)) * **deps-dev:** bump mypy from 1.1.1 to 1.2.0 ([#2096](https://github.com/awslabs/aws-lambda-powertools-python/issues/2096)) * **deps-dev:** bump cfn-lint from 0.76.2 to 0.77.0 ([#2107](https://github.com/awslabs/aws-lambda-powertools-python/issues/2107)) * **deps-dev:** bump pytest from 7.2.2 to 7.3.0 ([#2106](https://github.com/awslabs/aws-lambda-powertools-python/issues/2106)) @@ -3098,7 +3114,8 @@ * Merge pull request [#5](https://github.com/awslabs/aws-lambda-powertools-python/issues/5) from jfuss/feat/python38 -[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.12.0...HEAD +[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.13.0...HEAD +[v2.13.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.12.0...v2.13.0 [v2.12.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.11.0...v2.12.0 [v2.11.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.10.0...v2.11.0 [v2.10.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v2.9.1...v2.10.0 From 0f1c776e7cefe5cea29c8864deeed2c9597d01a4 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 15:48:11 +0200 Subject: [PATCH 07/22] fix(layers): add debug to update layer arn script --- layer/scripts/update_layer_arn.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/layer/scripts/update_layer_arn.sh b/layer/scripts/update_layer_arn.sh index 55734941839..0ad3e1617fe 100755 --- a/layer/scripts/update_layer_arn.sh +++ b/layer/scripts/update_layer_arn.sh @@ -7,6 +7,7 @@ # see .github/workflows/reusable_deploy_v2_layer_stack.yml set -eo pipefail +set -x if [[ $# -ne 1 ]]; then cat < Date: Fri, 14 Apr 2023 13:59:39 +0000 Subject: [PATCH 08/22] chore: update v2 layer ARN on documentation --- docs/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 6b0db547dea..829a1e74618 100644 --- a/docs/index.md +++ b/docs/index.md @@ -84,21 +84,21 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | From fbcd029c5c691dc6a3dbc233a2fb1635fcdaa587 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 16:06:35 +0200 Subject: [PATCH 09/22] fix(ci): fix layer version in tracer, logger and metrics --- examples/logger/sam/template.yaml | 2 +- examples/metrics/sam/template.yaml | 2 +- examples/tracer/sam/template.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/logger/sam/template.yaml b/examples/logger/sam/template.yaml index 3f702bfc041..3fdf5f2742d 100644 --- a/examples/logger/sam/template.yaml +++ b/examples/logger/sam/template.yaml @@ -14,7 +14,7 @@ Globals: Layers: # Find the latest Layer version in the official documentation # https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:21 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 Resources: LoggerLambdaHandlerExample: diff --git a/examples/metrics/sam/template.yaml b/examples/metrics/sam/template.yaml index 154dacdfd9b..532de6cb335 100644 --- a/examples/metrics/sam/template.yaml +++ b/examples/metrics/sam/template.yaml @@ -15,7 +15,7 @@ Globals: Layers: # Find the latest Layer version in the official documentation # https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:21 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 Resources: CaptureLambdaHandlerExample: diff --git a/examples/tracer/sam/template.yaml b/examples/tracer/sam/template.yaml index bda46d308b3..1b3f5d65338 100644 --- a/examples/tracer/sam/template.yaml +++ b/examples/tracer/sam/template.yaml @@ -13,7 +13,7 @@ Globals: Layers: # Find the latest Layer version in the official documentation # https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:21 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 Resources: CaptureLambdaHandlerExample: From 86814a4cc8403fb2be454d2d7d6d1225376f084f Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Fri, 14 Apr 2023 16:07:11 +0200 Subject: [PATCH 10/22] Revert "chore: update v2 layer ARN on documentation" This reverts commit 3d9b9a975014b2f7a3033d41d1bf39a26cb750e6. --- docs/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 829a1e74618..6b0db547dea 100644 --- a/docs/index.md +++ b/docs/index.md @@ -84,21 +84,21 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | + | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | + | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | + | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | + | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:1](#){: .copyMe}:clipboard: | + | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | From eec569d5cfae2400e6b657b8d7fcb4d63714bcac Mon Sep 17 00:00:00 2001 From: Release bot Date: Fri, 14 Apr 2023 14:07:26 +0000 Subject: [PATCH 11/22] update changelog with latest changes --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f98298f3b..06d4813c17c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,14 @@ ## Bug Fixes +* **ci:** fix layer version in tracer, logger and metrics * **ci:** typo * **docs:** add Layer ARN for new 5 regions +* **layers:** add debug to update layer arn script ## Maintenance +* update v2 layer ARN on documentation * update v2 layer ARN on documentation * **ci:** add support for x86-64 regions only ([#2122](https://github.com/awslabs/aws-lambda-powertools-python/issues/2122)) * **layer:** change layer-balance script to support new regions From 80b7d4e5e771aee79ef9c150f8d6b2493e360d02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Apr 2023 20:59:49 +0000 Subject: [PATCH 12/22] chore(deps-dev): bump mypy-boto3-lambda from 1.26.109 to 1.26.114 (#2126) Bumps [mypy-boto3-lambda](https://github.com/youtype/mypy_boto3_builder) from 1.26.109 to 1.26.114. - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) --- updated-dependencies: - dependency-name: mypy-boto3-lambda dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 399a8671da5..04b411ac679 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1750,14 +1750,14 @@ typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.9\""} [[package]] name = "mypy-boto3-lambda" -version = "1.26.109" -description = "Type annotations for boto3.Lambda 1.26.109 service generated with mypy-boto3-builder 7.14.5" +version = "1.26.114" +description = "Type annotations for boto3.Lambda 1.26.114 service generated with mypy-boto3-builder 7.14.5" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "mypy-boto3-lambda-1.26.109.tar.gz", hash = "sha256:40c7773c33fca2bec4bb9ed7edb0506887e30247eb9b2da60d277214b1b020cb"}, - {file = "mypy_boto3_lambda-1.26.109-py3-none-any.whl", hash = "sha256:caa7eff782ff2fae3cab36721a75331c988b741d1b4152ee6cd0dcf9e1a60f38"}, + {file = "mypy-boto3-lambda-1.26.114.tar.gz", hash = "sha256:72ae6723717cf552e579e9e76380063f470f957481a64848a353fd7c568ef17d"}, + {file = "mypy_boto3_lambda-1.26.114-py3-none-any.whl", hash = "sha256:e6d10436b49331e0b4e78efd27354b832a3fee5936a154a85fd9733e0cd80e71"}, ] [package.dependencies] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "02fa7bb284f7d689059624f5a30f9600f87e8c9c3929243f9a3db38b45386c7e" +content-hash = "6d47edb47d4ae1871df308d1548d994115c3efff60bc287a33e74ad81a758d89" diff --git a/pyproject.toml b/pyproject.toml index 61a5246e4b2..aaddf5db8ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ mypy-boto3-appconfig = "^1.26.71" mypy-boto3-cloudformation = "^1.26.108" mypy-boto3-cloudwatch = "^1.26.99" mypy-boto3-dynamodb = "^1.26.97" -mypy-boto3-lambda = "^1.26.109" +mypy-boto3-lambda = "^1.26.114" mypy-boto3-logs = "^1.26.53" mypy-boto3-secretsmanager = "^1.26.89" mypy-boto3-ssm = "^1.26.97" From c624658c74fed2b4265c1d6fd30a158801b158f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Apr 2023 08:44:50 +0100 Subject: [PATCH 13/22] chore(deps-dev): bump pytest from 7.3.0 to 7.3.1 (#2127) --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 04b411ac679..e8cba83ba25 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2189,14 +2189,14 @@ files = [ [[package]] name = "pytest" -version = "7.3.0" +version = "7.3.1" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.3.0-py3-none-any.whl", hash = "sha256:933051fa1bfbd38a21e73c3960cebdad4cf59483ddba7696c48509727e17f201"}, - {file = "pytest-7.3.0.tar.gz", hash = "sha256:58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d"}, + {file = "pytest-7.3.1-py3-none-any.whl", hash = "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362"}, + {file = "pytest-7.3.1.tar.gz", hash = "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"}, ] [package.dependencies] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "6d47edb47d4ae1871df308d1548d994115c3efff60bc287a33e74ad81a758d89" +content-hash = "57627c2fe353a2d9e85db34c609b9215821fbfa203f62d0521d5781f41682a35" diff --git a/pyproject.toml b/pyproject.toml index aaddf5db8ea..727e9dfc73a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ typing-extensions = "^4.4.0" [tool.poetry.dev-dependencies] coverage = {extras = ["toml"], version = "^7.2"} -pytest = "^7.3.0" +pytest = "^7.3.1" black = "^23.3" boto3 = "^1.18" flake8 = [ From 453c9320f03f5ce0880058e4576d6749a6602bf7 Mon Sep 17 00:00:00 2001 From: Release bot Date: Mon, 17 Apr 2023 08:00:15 +0000 Subject: [PATCH 14/22] update changelog with latest changes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06d4813c17c..05bab17d15f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ * update v2 layer ARN on documentation * update v2 layer ARN on documentation * **ci:** add support for x86-64 regions only ([#2122](https://github.com/awslabs/aws-lambda-powertools-python/issues/2122)) +* **deps-dev:** bump pytest from 7.3.0 to 7.3.1 ([#2127](https://github.com/awslabs/aws-lambda-powertools-python/issues/2127)) +* **deps-dev:** bump mypy-boto3-lambda from 1.26.109 to 1.26.114 ([#2126](https://github.com/awslabs/aws-lambda-powertools-python/issues/2126)) * **layer:** change layer-balance script to support new regions From 671af87d18b163504db228ca2b38f94401946695 Mon Sep 17 00:00:00 2001 From: Heitor Lessa Date: Mon, 17 Apr 2023 16:24:12 +0200 Subject: [PATCH 15/22] chore(github): new tech debt issue form (#2131) * chore: add new tech debt template Signed-off-by: heitorlessa * chore: sync up maintenance template with tech debt template Signed-off-by: heitorlessa * docs: add tech-debt label in maintainers playbook --------- Signed-off-by: heitorlessa --- .github/ISSUE_TEMPLATE/maintenance.yml | 16 ++---- .github/ISSUE_TEMPLATE/tech_debt.yml | 62 ++++++++++++++++++++++ MAINTAINERS.md | 71 +++++++++++++------------- 3 files changed, 102 insertions(+), 47 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/tech_debt.yml diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml index 2f60a0f013a..95473ac1c61 100644 --- a/.github/ISSUE_TEMPLATE/maintenance.yml +++ b/.github/ISSUE_TEMPLATE/maintenance.yml @@ -1,5 +1,5 @@ name: Maintenance -description: Suggest an activity to help address tech debt, governance, and anything internal +description: Suggest an activity to help address governance and anything internal title: "Maintenance: TITLE" labels: ["internal", "triage"] body: @@ -9,13 +9,6 @@ body: Thank you for taking the time to help us improve operational excellence. *Future readers*: Please react with 👍 and your use case to help us understand customer demand. - - type: textarea - id: activity - attributes: - label: Summary - description: Please provide an overview in one or two paragraphs - validations: - required: true - type: textarea id: importance attributes: @@ -29,8 +22,6 @@ body: label: Which area does this relate to? multiple: true options: - - Automation - - Governance - Tests - Static typing - Tracer @@ -41,13 +32,14 @@ body: - Middleware factory - Parameters - Batch processing - - Typing - Validation - Event Source Data Classes - Parser - Idempotency - Feature flags - JMESPath functions + - Streaming + - Automation - Other - type: textarea id: suggestion @@ -63,7 +55,7 @@ body: options: - label: This request meets [Lambda Powertools Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets) required: true - - label: Should this be considered in other Lambda Powertools languages? i.e. [Java](https://github.com/awslabs/aws-lambda-powertools-java/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/) + - label: Should this be considered in other Lambda Powertools languages? i.e. [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/) required: false - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/tech_debt.yml b/.github/ISSUE_TEMPLATE/tech_debt.yml new file mode 100644 index 00000000000..84b5cffe189 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/tech_debt.yml @@ -0,0 +1,62 @@ +name: Technical debt +description: Suggest an activity to help address technical debt. +title: "Tech debt: TITLE" +labels: ["tech-debt", "triage"] +body: + - type: markdown + attributes: + value: Thank you for taking the time to help us proactively improve delivery velocity, safely. + - type: textarea + id: importance + attributes: + label: Why is this needed? + description: Please help us understand the value so we can prioritize it accordingly + validations: + required: true + - type: dropdown + id: area + attributes: + label: Which area does this relate to? + multiple: true + options: + - Tests + - Static typing + - Tracer + - Logger + - Metrics + - Event Handler - REST API + - Event Handler - GraphQL API + - Middleware factory + - Parameters + - Batch processing + - Validation + - Event Source Data Classes + - Parser + - Idempotency + - Feature flags + - JMESPath functions + - Streaming + - Automation + - Other + - type: textarea + id: suggestion + attributes: + label: Suggestion + description: If available, please share what a good solution would look like + validations: + required: false + - type: checkboxes + id: acknowledgment + attributes: + label: Acknowledgment + options: + - label: This request meets [Lambda Powertools Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets) + required: true + - label: Should this be considered in other Lambda Powertools languages? i.e. [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/) + required: false + - type: markdown + attributes: + value: | + --- + + **Disclaimer**: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful. diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 90e41eb6345..a82c160a58d 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -69,41 +69,42 @@ Previous active maintainers who contributed to this project. These are the most common labels used by maintainers to triage issues, pull requests (PR), and for project management: -| Label | Usage | Notes | -| ---------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------- | -| triage | New issues that require maintainers review | Issue template | -| bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | -| not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | -| documentation | Documentation improvements | PR/Release automation; Doc additions, fixes, etc.; | -| feature-request | New or enhancements to existing features | Issue template | -| typing | New or enhancements to static typing | Issue template | -| RFC | Technical design documents related to a feature request | Issue template | -| bug-upstream | Bug caused by upstream dependency | | -| help wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | -| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | -| need-more-information | Missing information before making any calls | | -| need-documentation | PR is missing or has incomplete documentation | | -| need-issue | PR is missing a related issue for tracking change | Needs to be automated | -| need-rfc | Feature request requires a RFC to improve discussion | | -| pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | -| revisit-in-3-months | Blocked issues/PRs that need to be revisited | Often related to `need-customer-feedback`, prioritization, etc. | -| breaking-change | Changes that will cause customer impact and need careful triage | | -| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | -| size/XS | PRs between 0-9 LOC | PR automation | -| size/S | PRs between 10-29 LOC | PR automation | -| size/M | PRs between 30-99 LOC | PR automation | -| size/L | PRs between 100-499 LOC | PR automation | -| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | -| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | -| tests | PRs that add or change tests | PR automation | -| `` | PRs related to a Powertools utility, e.g. `parameters`, `tracer` | PR automation | -| feature | New features or minor changes | PR/Release automation | -| dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | PR/ automation | -| github-actions | Changes in GitHub workflows | PR automation | -| github-templates | Changes in GitHub issue/PR templates | PR automation | -| internal | Changes in governance, tech debt and chores (linting setup, baseline, etc.) | PR automation | -| customer-reference | Authorization to use company name in our documentation | Public Relations | -| community-content | Suggested content to feature in our documentation | Public Relations | +| Label | Usage | Notes | +| ---------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------- | +| triage | New issues that require maintainers review | Issue template | +| bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | +| not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | +| documentation | Documentation improvements | PR/Release automation; Doc additions, fixes, etc.; | +| feature-request | New or enhancements to existing features | Issue template | +| typing | New or enhancements to static typing | Issue template | +| RFC | Technical design documents related to a feature request | Issue template | +| bug-upstream | Bug caused by upstream dependency | | +| help wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | +| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | +| need-more-information | Missing information before making any calls | | +| need-documentation | PR is missing or has incomplete documentation | | +| need-issue | PR is missing a related issue for tracking change | PR automation | +| need-rfc | Feature request requires a RFC to improve discussion | | +| pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | +| revisit-in-3-months | Blocked issues/PRs that need to be revisited | Often related to `need-customer-feedback`, prioritization, etc. | +| breaking-change | Changes that will cause customer impact and need careful triage | | +| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | +| size/XS | PRs between 0-9 LOC | PR automation | +| size/S | PRs between 10-29 LOC | PR automation | +| size/M | PRs between 30-99 LOC | PR automation | +| size/L | PRs between 100-499 LOC | PR automation | +| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | +| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | +| tests | PRs that add or change tests | PR automation | +| `` | PRs related to a Powertools utility, e.g. `parameters`, `tracer` | PR automation | +| feature | New features or minor changes | PR/Release automation | +| dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | PR/ automation | +| github-actions | Changes in GitHub workflows | PR automation | +| github-templates | Changes in GitHub issue/PR templates | PR automation | +| internal | Changes in governance and chores (linting setup, baseline, etc.) | PR automation | +| tech-debt | Changes in tech debt | | +| customer-reference | Authorization to use company name in our documentation | Public Relations | +| community-content | Suggested content to feature in our documentation | Public Relations | ## Maintainer Responsibilities From 58617abfde3aea44cfd214785ce48d2e1dadcada Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 21:02:16 +0000 Subject: [PATCH 16/22] chore(deps-dev): bump mypy-boto3-dynamodb from 1.26.97.post1 to 1.26.115 (#2132) Bumps [mypy-boto3-dynamodb](https://github.com/youtype/mypy_boto3_builder) from 1.26.97.post1 to 1.26.115. - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) --- updated-dependencies: - dependency-name: mypy-boto3-dynamodb dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index e8cba83ba25..3fbcec685ea 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1735,14 +1735,14 @@ typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.9\""} [[package]] name = "mypy-boto3-dynamodb" -version = "1.26.97.post1" -description = "Type annotations for boto3.DynamoDB 1.26.97 service generated with mypy-boto3-builder 7.14.1" +version = "1.26.115" +description = "Type annotations for boto3.DynamoDB 1.26.115 service generated with mypy-boto3-builder 7.14.5" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "mypy-boto3-dynamodb-1.26.97.post1.tar.gz", hash = "sha256:d7a53eda6b185737ad7718d3b46fd0cb0b4cf1b854c0b259754cd9060baef7d2"}, - {file = "mypy_boto3_dynamodb-1.26.97.post1-py3-none-any.whl", hash = "sha256:291700151a786e5ecb7274a9f7dbfda326419bab990b88e6299f4b8ee62473f6"}, + {file = "mypy-boto3-dynamodb-1.26.115.tar.gz", hash = "sha256:b94d69617d118421d625120d38b81772ef3aa2ba2d98e771008f9c72388f60f1"}, + {file = "mypy_boto3_dynamodb-1.26.115-py3-none-any.whl", hash = "sha256:280d4b71b716e221887cfbd8aeb27699efb2ed5f5ac98621878dbe99492dcd8c"}, ] [package.dependencies] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "57627c2fe353a2d9e85db34c609b9215821fbfa203f62d0521d5781f41682a35" +content-hash = "54a605ed5e060e23c900dff54366b4d1f7062989c2198ae40d51ec4878b11cee" diff --git a/pyproject.toml b/pyproject.toml index 727e9dfc73a..7ce46ec7b10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ python-snappy = "^0.6.1" mypy-boto3-appconfig = "^1.26.71" mypy-boto3-cloudformation = "^1.26.108" mypy-boto3-cloudwatch = "^1.26.99" -mypy-boto3-dynamodb = "^1.26.97" +mypy-boto3-dynamodb = "^1.26.115" mypy-boto3-lambda = "^1.26.114" mypy-boto3-logs = "^1.26.53" mypy-boto3-secretsmanager = "^1.26.89" From bf0bae24b9da7f87f3e5634142a847e09631823d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 06:06:28 +0000 Subject: [PATCH 17/22] chore(deps-dev): bump cfn-lint from 0.77.0 to 0.77.1 (#2133) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3fbcec685ea..6aba07546cc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -370,14 +370,14 @@ files = [ [[package]] name = "cfn-lint" -version = "0.77.0" +version = "0.77.1" description = "Checks CloudFormation templates for practices and behaviour that could potentially be improved" category = "dev" optional = false python-versions = ">=3.7, <=4.0, !=4.0" files = [ - {file = "cfn-lint-0.77.0.tar.gz", hash = "sha256:a1cf0499a0a17028431d2728cb41fe196e7d4365984a4a42002774ff5c1706c6"}, - {file = "cfn_lint-0.77.0-py3-none-any.whl", hash = "sha256:a85b70a6ee281c1aac473aee9da0e0f8ff104e66f1669d684caddf3df8ce5cb7"}, + {file = "cfn-lint-0.77.1.tar.gz", hash = "sha256:f2861748ef8ba4bcb9f47bd12ea396f11b0f29ff50ca98fec39de52695544b61"}, + {file = "cfn_lint-0.77.1-py3-none-any.whl", hash = "sha256:19ae30984d3538c14439b39f9488fa0d4ea5d15d2398e011209ae97300228652"}, ] [package.dependencies] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "54a605ed5e060e23c900dff54366b4d1f7062989c2198ae40d51ec4878b11cee" +content-hash = "609f93966055a3a2723f018ca7022221dee66718a98f6844364522db649902e5" diff --git a/pyproject.toml b/pyproject.toml index 7ce46ec7b10..e37b9b89b82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,7 +100,7 @@ all = ["pydantic", "aws-xray-sdk", "fastjsonschema"] aws-sdk = ["boto3"] [tool.poetry.group.dev.dependencies] -cfn-lint = "0.77.0" +cfn-lint = "0.77.1" mypy = "^1.1.1" types-python-dateutil = "^2.8.19.6" httpx = ">=0.23.3,<0.25.0" From 9a9a5033a584ae22e5d1531b34740db4c1b50589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 06:10:03 +0000 Subject: [PATCH 18/22] chore(deps-dev): bump mypy-boto3-lambda from 1.26.114 to 1.26.115 (#2135) Bumps [mypy-boto3-lambda](https://github.com/youtype/mypy_boto3_builder) from 1.26.114 to 1.26.115. - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) --- updated-dependencies: - dependency-name: mypy-boto3-lambda dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6aba07546cc..fa2ba28fb57 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1750,14 +1750,14 @@ typing-extensions = {version = ">=4.1.0", markers = "python_version < \"3.9\""} [[package]] name = "mypy-boto3-lambda" -version = "1.26.114" -description = "Type annotations for boto3.Lambda 1.26.114 service generated with mypy-boto3-builder 7.14.5" +version = "1.26.115" +description = "Type annotations for boto3.Lambda 1.26.115 service generated with mypy-boto3-builder 7.14.5" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "mypy-boto3-lambda-1.26.114.tar.gz", hash = "sha256:72ae6723717cf552e579e9e76380063f470f957481a64848a353fd7c568ef17d"}, - {file = "mypy_boto3_lambda-1.26.114-py3-none-any.whl", hash = "sha256:e6d10436b49331e0b4e78efd27354b832a3fee5936a154a85fd9733e0cd80e71"}, + {file = "mypy-boto3-lambda-1.26.115.tar.gz", hash = "sha256:f612eca8f0e418e66d577b5609f0119c4934a7637ce1342d3c1cfc0d065cd42d"}, + {file = "mypy_boto3_lambda-1.26.115-py3-none-any.whl", hash = "sha256:0d418bb0d6c16c6a83e159dae71f8c6dff663c50dab125bb1518bf6c29f2ed83"}, ] [package.dependencies] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "609f93966055a3a2723f018ca7022221dee66718a98f6844364522db649902e5" +content-hash = "9178cee32b9c766077ce20b83e5ae08a0b7e5f3a2cd4752f21727c5da6d67cef" diff --git a/pyproject.toml b/pyproject.toml index e37b9b89b82..7b8d1984f45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ mypy-boto3-appconfig = "^1.26.71" mypy-boto3-cloudformation = "^1.26.108" mypy-boto3-cloudwatch = "^1.26.99" mypy-boto3-dynamodb = "^1.26.115" -mypy-boto3-lambda = "^1.26.114" +mypy-boto3-lambda = "^1.26.115" mypy-boto3-logs = "^1.26.53" mypy-boto3-secretsmanager = "^1.26.89" mypy-boto3-ssm = "^1.26.97" From 365aa7c5c3f52894e3f675d05eb61197e08f086f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 06:12:43 +0000 Subject: [PATCH 19/22] chore(deps-dev): bump importlib-metadata from 6.3.0 to 6.4.1 (#2134) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index fa2ba28fb57..57023b09068 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1091,14 +1091,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.3.0" +version = "6.4.1" description = "Read metadata from Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-6.3.0-py3-none-any.whl", hash = "sha256:8f8bd2af397cf33bd344d35cfe7f489219b7d14fc79a3f854b75b8417e9226b0"}, - {file = "importlib_metadata-6.3.0.tar.gz", hash = "sha256:23c2bcae4762dfb0bbe072d358faec24957901d75b6c4ab11172c0c982532402"}, + {file = "importlib_metadata-6.4.1-py3-none-any.whl", hash = "sha256:63ace321e24167d12fbb176b6015f4dbe06868c54a2af4f15849586afb9027fd"}, + {file = "importlib_metadata-6.4.1.tar.gz", hash = "sha256:eb1a7933041f0f85c94cd130258df3fb0dec060ad8c1c9318892ef4192c47ce1"}, ] [package.dependencies] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "9178cee32b9c766077ce20b83e5ae08a0b7e5f3a2cd4752f21727c5da6d67cef" +content-hash = "7d512bca260ee0a5f8e74c7e71f230973f9c34864f1a501661ead575068098e2" diff --git a/pyproject.toml b/pyproject.toml index 7b8d1984f45..2d824125577 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,7 @@ mkdocs-material = "^9.1.6" filelock = "^3.11.0" checksumdir = "^1.2.0" mypy-boto3-appconfigdata = "^1.26.70" -importlib-metadata = "^6.3" +importlib-metadata = "^6.4" ijson = "^3.2.0" typed-ast = { version = "^1.5.4", python = "< 3.8"} hvac = "^1.1.0" From a77832c278b9ac656091dd92c03785d1625b89d2 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Tue, 18 Apr 2023 20:04:04 +0200 Subject: [PATCH 20/22] feat(runtime): add support for python 3.10 (#2137) * feat: add support for python 3.10 * fix: add 3.10 to all workflows * fix: workflow version * fix: python version * fix: bump performance SLA * revert: reverting metrics sla values * fix: bump cdk layer version to support Python 3.10 * fix: addressed comments on PR --------- Co-authored-by: Leandro Damascena --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/static_typing.yml | 2 +- .github/workflows/publish_v2_layer.yml | 2 +- .github/workflows/python_build.yml | 4 +- .github/workflows/release.yml | 2 +- .../reusable_deploy_v2_layer_stack.yml | 2 +- .github/workflows/reusable_publish_docs.yml | 2 +- .github/workflows/run-e2e-tests.yml | 2 +- layer/poetry.lock | 54 +++---- layer/pyproject.toml | 4 +- package-lock.json | 120 ++++++++-------- package.json | 2 +- poetry.lock | 134 +++++++++--------- pyproject.toml | 2 +- .../function_thread_safety_handler.py | 2 +- tests/e2e/utils/infrastructure.py | 21 ++- 16 files changed, 186 insertions(+), 171 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 6d441bf0c64..e3dd2c17667 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -58,10 +58,10 @@ body: attributes: label: AWS Lambda function runtime options: - - 3.6 - 3.7 - 3.8 - 3.9 + - 3.10 validations: required: true - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/static_typing.yml b/.github/ISSUE_TEMPLATE/static_typing.yml index 863dde7d33f..3bd302e7e1c 100644 --- a/.github/ISSUE_TEMPLATE/static_typing.yml +++ b/.github/ISSUE_TEMPLATE/static_typing.yml @@ -25,10 +25,10 @@ body: attributes: label: AWS Lambda function runtime options: - - 3.6 - 3.7 - 3.8 - 3.9 + - 3.10 validations: required: true - type: input diff --git a/.github/workflows/publish_v2_layer.yml b/.github/workflows/publish_v2_layer.yml index 9afd02d1465..8d8a8c34aae 100644 --- a/.github/workflows/publish_v2_layer.yml +++ b/.github/workflows/publish_v2_layer.yml @@ -50,7 +50,7 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" cache: "pip" - name: Resolve and install project dependencies # CDK spawns system python when compiling stack diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index 00a152e82d0..b126c285918 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -28,9 +28,9 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ["3.7", "3.8", "3.9", "3.10"] env: - PYTHON: ${{ matrix.python-version }} + PYTHON: "${{ matrix.python-version }}" steps: - uses: actions/checkout@v3 - name: Install poetry diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb35c5917f6..a3f05dc15e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" cache: "poetry" - name: Set release notes tag id: release_version diff --git a/.github/workflows/reusable_deploy_v2_layer_stack.yml b/.github/workflows/reusable_deploy_v2_layer_stack.yml index f4b4fe73f24..5af5d6385d0 100644 --- a/.github/workflows/reusable_deploy_v2_layer_stack.yml +++ b/.github/workflows/reusable_deploy_v2_layer_stack.yml @@ -108,7 +108,7 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" cache: "pip" - name: Resolve and install project dependencies # CDK spawns system python when compiling stack diff --git a/.github/workflows/reusable_publish_docs.yml b/.github/workflows/reusable_publish_docs.yml index aad83c0cddb..9be91b212bf 100644 --- a/.github/workflows/reusable_publish_docs.yml +++ b/.github/workflows/reusable_publish_docs.yml @@ -41,7 +41,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.10" cache: "poetry" - name: Install dependencies run: make dev diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 73e39e28d79..2f7b2f494ea 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false # needed so if a version fails, the others will still be able to complete and cleanup matrix: - version: ["3.7", "3.8", "3.9"] + version: ["3.7", "3.8", "3.9", "3.10"] if: ${{ github.actor != 'dependabot[bot]' }} steps: - name: "Checkout" diff --git a/layer/poetry.lock b/layer/poetry.lock index 39faf15d289..e0dab1f3647 100644 --- a/layer/poetry.lock +++ b/layer/poetry.lock @@ -21,14 +21,14 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy [[package]] name = "aws-cdk-asset-awscli-v1" -version = "2.2.138" +version = "2.2.144" description = "A library that contains the AWS CLI for use in Lambda Layers" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.asset-awscli-v1-2.2.138.tar.gz", hash = "sha256:0a6880aa02399f74102e120aee96db75ec122a199b0735494c3dbcd09bd89c9c"}, - {file = "aws_cdk.asset_awscli_v1-2.2.138-py3-none-any.whl", hash = "sha256:d1f4e1b6a4bf5e9f1a7380a6141a3bf55d6fb6f1abfb0e1450bb258de3702f01"}, + {file = "aws-cdk.asset-awscli-v1-2.2.144.tar.gz", hash = "sha256:2953dbaa0dae2a1893318452a6d681a975cb73f160d61eb197a6b47b293c6371"}, + {file = "aws_cdk.asset_awscli_v1-2.2.144-py3-none-any.whl", hash = "sha256:cf9fd74fc56b4333ffb3631ce38ca585ec722fd59bd06f5f9b61c7f838ba1dd4"}, ] [package.dependencies] @@ -55,14 +55,14 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-asset-node-proxy-agent-v5" -version = "2.0.114" +version = "2.0.119" description = "@aws-cdk/asset-node-proxy-agent-v5" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.asset-node-proxy-agent-v5-2.0.114.tar.gz", hash = "sha256:5f8a0ecb4128617ef8321dd1b3501b52e4a071e7481a7d1498775897299f7349"}, - {file = "aws_cdk.asset_node_proxy_agent_v5-2.0.114-py3-none-any.whl", hash = "sha256:3b034917bd15f84c710b031dbd29d7fbbb665ce16a609eaabd890fa47949df40"}, + {file = "aws-cdk.asset-node-proxy-agent-v5-2.0.119.tar.gz", hash = "sha256:2a93b5a0870c0914771a0591a82aa44134f25e0236f94d05d4a558465caff385"}, + {file = "aws_cdk.asset_node_proxy_agent_v5-2.0.119-py3-none-any.whl", hash = "sha256:ea59cc9f924fc9c566819b7106b330e7632e4b5f9c1d3bee3d3d494615bc680d"}, ] [package.dependencies] @@ -72,14 +72,14 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-lib" -version = "2.73.0" +version = "2.75.0" description = "Version 2 of the AWS Cloud Development Kit library" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk-lib-2.73.0.tar.gz", hash = "sha256:9e93044d19ae26ef4303b39cbd4b083f8b183bb9211bc2f9b76698a8c765d8ad"}, - {file = "aws_cdk_lib-2.73.0-py3-none-any.whl", hash = "sha256:60271826f4d53267b39c43aaba93eecbcd2b85c1a1ae206ce56f347344903554"}, + {file = "aws-cdk-lib-2.75.0.tar.gz", hash = "sha256:e81e328906577a79d8bb2980403e37a83645f8a883ba5c1309b399b5e0d1baae"}, + {file = "aws_cdk_lib-2.75.0-py3-none-any.whl", hash = "sha256:eb11341f2dc7134a354087396b2efcd952f54f3cff18c5c55a281cd6c45fc821"}, ] [package.dependencies] @@ -93,18 +93,18 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "boto3" -version = "1.26.112" +version = "1.26.115" description = "The AWS SDK for Python" category = "dev" optional = false python-versions = ">= 3.7" files = [ - {file = "boto3-1.26.112-py3-none-any.whl", hash = "sha256:03c2e1ddd29d993a6ab9b8a8fe184027957fc32bd405c496ad0c30311445925f"}, - {file = "boto3-1.26.112.tar.gz", hash = "sha256:4ea3319bba2e8ff7cd9560259ae64f073c7fb6312158aa375777687231cabe69"}, + {file = "boto3-1.26.115-py3-none-any.whl", hash = "sha256:deb53ad15ff0e75ae0be6d7115a2d34e4bafb0541484485f0feb61dabdfb5513"}, + {file = "boto3-1.26.115.tar.gz", hash = "sha256:2272a060005bf8299f7342cbf1344304eb44b7060cddba6784f676e3bc737bb8"}, ] [package.dependencies] -botocore = ">=1.29.112,<1.30.0" +botocore = ">=1.29.115,<1.30.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.6.0,<0.7.0" @@ -113,14 +113,14 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.29.112" +version = "1.29.115" description = "Low-level, data-driven core of boto 3." category = "dev" optional = false python-versions = ">= 3.7" files = [ - {file = "botocore-1.29.112-py3-none-any.whl", hash = "sha256:2cbaddb09b46dcb0a05490724d51acb224d3a8df433c347f995b4d78bfb02c8a"}, - {file = "botocore-1.29.112.tar.gz", hash = "sha256:1f52d9371d7b5ee30a53dcef7954c3cf22e04b131cfab5268035f3299ccde9e1"}, + {file = "botocore-1.29.115-py3-none-any.whl", hash = "sha256:dff327977d7c9f98f2dc54b51b8f70326952dd50ae23b885fdfa8bfeec014b76"}, + {file = "botocore-1.29.115.tar.gz", hash = "sha256:58eee8cf8f4f3e515df29f6dc535dd86ed3f4cea40999c5bc74640ff40bdc71f"}, ] [package.dependencies] @@ -149,18 +149,18 @@ exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "cdk-aws-lambda-powertools-layer" -version = "3.4.0" +version = "3.5.0" description = "A lambda layer for AWS Powertools for python and typescript" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "cdk-aws-lambda-powertools-layer-3.4.0.tar.gz", hash = "sha256:3d3e89cb3b0f201f6f96473208e66b18279688049317d9c9849584a03c5d54a0"}, - {file = "cdk_aws_lambda_powertools_layer-3.4.0-py3-none-any.whl", hash = "sha256:bb3c157de17d3fbdcbdc33e5ee967cc80606bbb7a14f46e4f1f6cc8c28db5c86"}, + {file = "cdk-aws-lambda-powertools-layer-3.5.0.tar.gz", hash = "sha256:801dd0f3decc918ab1225ff9b6de2d0f979c492004b66511c76b70cee472c4ba"}, + {file = "cdk_aws_lambda_powertools_layer-3.5.0-py3-none-any.whl", hash = "sha256:71427de2e99f41afde2cfaf2d2cf80d0e13cdc0d9ec392f9f5a60277812471cd"}, ] [package.dependencies] -aws-cdk-lib = ">=2.70.0,<3.0.0" +aws-cdk-lib = ">=2.75.0,<3.0.0" constructs = ">=10.0.5,<11.0.0" jsii = ">=1.80.0,<2.0.0" publication = ">=0.0.3" @@ -180,14 +180,14 @@ files = [ [[package]] name = "constructs" -version = "10.1.309" +version = "10.2.0" description = "A programming model for software-defined state" category = "main" optional = false python-versions = "~=3.7" files = [ - {file = "constructs-10.1.309-py3-none-any.whl", hash = "sha256:3127067e99151d1094b05443452bc9f84c685a719c00031c7b5e55e294e0deb7"}, - {file = "constructs-10.1.309.tar.gz", hash = "sha256:cbc36a68187d4c9dd33b46b87aac2dda469bfda95c37d4c198bd98911064dce8"}, + {file = "constructs-10.2.0-py3-none-any.whl", hash = "sha256:b915d4447c008b8e259d3565a8507f71014a40fdb8f31dfc3fb008c5190eef8a"}, + {file = "constructs-10.2.0.tar.gz", hash = "sha256:30c234f7c3be28200a433b47a43d584fb5c5684e67e316b495ec059b1e0dfaef"}, ] [package.dependencies] @@ -316,14 +316,14 @@ files = [ [[package]] name = "pytest" -version = "7.3.0" +version = "7.3.1" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.3.0-py3-none-any.whl", hash = "sha256:933051fa1bfbd38a21e73c3960cebdad4cf59483ddba7696c48509727e17f201"}, - {file = "pytest-7.3.0.tar.gz", hash = "sha256:58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d"}, + {file = "pytest-7.3.1-py3-none-any.whl", hash = "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362"}, + {file = "pytest-7.3.1.tar.gz", hash = "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"}, ] [package.dependencies] @@ -458,4 +458,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "ade085b1989174ee03e7f27a781b580e2f7199441da6d8f60b3bf7891f6ca66e" +content-hash = "dc47627a359b35b4080bcb1243d5fb814dc93086442c7a393560a2ba92633acd" diff --git a/layer/pyproject.toml b/layer/pyproject.toml index 5f10af27b94..5be2628e825 100644 --- a/layer/pyproject.toml +++ b/layer/pyproject.toml @@ -3,11 +3,11 @@ name = "aws-lambda-powertools-python-layer" version = "1.1.0" description = "AWS Lambda Powertools for Python Lambda Layers" authors = ["DevAx "] -license = "MIT" +license = "MIT" [tool.poetry.dependencies] python = "^3.9" -cdk-aws-lambda-powertools-layer = "^3.4.0" +cdk-aws-lambda-powertools-layer = "^3.5.0" [tool.poetry.dev-dependencies] pytest = "^7.1.2" diff --git a/package-lock.json b/package-lock.json index 3305a07d40f..ee0c802acc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,62 +1,62 @@ { - "name": "aws-lambda-powertools-python-e2e", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "aws-lambda-powertools-python-e2e", - "version": "1.0.0", - "devDependencies": { - "aws-cdk": "^2.74.0" - } - }, - "node_modules/aws-cdk": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.74.0.tgz", - "integrity": "sha512-pc6QO9uR7Ii0qQ74nujskkFqPCGoWTTMyt03CFaGW0CwxMfpduGC0+bvlLBbJISAe5ZGuRuYIIxxDMkNi3AIcw==", - "dev": true, - "bin": { - "cdk": "bin/cdk" - }, - "engines": { - "node": ">= 14.15.0" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - } - }, - "dependencies": { - "aws-cdk": { - "version": "2.74.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.74.0.tgz", - "integrity": "sha512-pc6QO9uR7Ii0qQ74nujskkFqPCGoWTTMyt03CFaGW0CwxMfpduGC0+bvlLBbJISAe5ZGuRuYIIxxDMkNi3AIcw==", - "dev": true, - "requires": { - "fsevents": "2.3.2" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - } - } + "name": "aws-lambda-powertools-python-e2e", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "aws-lambda-powertools-python-e2e", + "version": "1.0.0", + "devDependencies": { + "aws-cdk": "^2.75.0" + } + }, + "node_modules/aws-cdk": { + "version": "2.75.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.75.0.tgz", + "integrity": "sha512-BkyWNpYZz66Ewoi7rBPYZnW+0BAKbWYawhQ1v7KQWmGB0cFlQmvIfoOFklF5EOyAKOltUVRQF6KJf1/AIedkmg==", + "dev": true, + "bin": { + "cdk": "bin/cdk" + }, + "engines": { + "node": ">= 14.15.0" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + } + }, + "dependencies": { + "aws-cdk": { + "version": "2.75.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.75.0.tgz", + "integrity": "sha512-BkyWNpYZz66Ewoi7rBPYZnW+0BAKbWYawhQ1v7KQWmGB0cFlQmvIfoOFklF5EOyAKOltUVRQF6KJf1/AIedkmg==", + "dev": true, + "requires": { + "fsevents": "2.3.2" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + } + } } diff --git a/package.json b/package.json index 6eef515eb28..1d08fc890ac 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,6 @@ "name": "aws-lambda-powertools-python-e2e", "version": "1.0.0", "devDependencies": { - "aws-cdk": "^2.74.0" + "aws-cdk": "^2.75.0" } } diff --git a/poetry.lock b/poetry.lock index 57023b09068..c27b98cd655 100644 --- a/poetry.lock +++ b/poetry.lock @@ -43,18 +43,18 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy [[package]] name = "aws-cdk-asset-awscli-v1" -version = "2.2.112" +version = "2.2.144" description = "A library that contains the AWS CLI for use in Lambda Layers" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.asset-awscli-v1-2.2.112.tar.gz", hash = "sha256:ffa513beb5dee9475473467301f56b1b28e371932a9dd3de1957ac13696f20c0"}, - {file = "aws_cdk.asset_awscli_v1-2.2.112-py3-none-any.whl", hash = "sha256:17521d316d400aa80759db7d815f44282413b818e032f75800d707540c939952"}, + {file = "aws-cdk.asset-awscli-v1-2.2.144.tar.gz", hash = "sha256:2953dbaa0dae2a1893318452a6d681a975cb73f160d61eb197a6b47b293c6371"}, + {file = "aws_cdk.asset_awscli_v1-2.2.144-py3-none-any.whl", hash = "sha256:cf9fd74fc56b4333ffb3631ce38ca585ec722fd59bd06f5f9b61c7f838ba1dd4"}, ] [package.dependencies] -jsii = ">=1.78.1,<2.0.0" +jsii = ">=1.80.0,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" @@ -77,90 +77,90 @@ typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-asset-node-proxy-agent-v5" -version = "2.0.90" +version = "2.0.119" description = "@aws-cdk/asset-node-proxy-agent-v5" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.asset-node-proxy-agent-v5-2.0.90.tar.gz", hash = "sha256:84bfd073116c2b84d24d2a600a4d22ffdca46a2e2d2373eab81616e1e030229b"}, - {file = "aws_cdk.asset_node_proxy_agent_v5-2.0.90-py3-none-any.whl", hash = "sha256:d9f2ac7e41e1b1eb7b59af36414b441cda393b6735a6c8967159b9a60b36c2a0"}, + {file = "aws-cdk.asset-node-proxy-agent-v5-2.0.119.tar.gz", hash = "sha256:2a93b5a0870c0914771a0591a82aa44134f25e0236f94d05d4a558465caff385"}, + {file = "aws_cdk.asset_node_proxy_agent_v5-2.0.119-py3-none-any.whl", hash = "sha256:ea59cc9f924fc9c566819b7106b330e7632e4b5f9c1d3bee3d3d494615bc680d"}, ] [package.dependencies] -jsii = ">=1.78.1,<2.0.0" +jsii = ">=1.80.0,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-aws-apigatewayv2-alpha" -version = "2.69.0a0" +version = "2.75.0a0" description = "The CDK Construct Library for AWS::APIGatewayv2" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.aws-apigatewayv2-alpha-2.69.0a0.tar.gz", hash = "sha256:f61aa37d839ce685bd8daa0c5058b664ab374b6e1d67582c2846c2b0230f4903"}, - {file = "aws_cdk.aws_apigatewayv2_alpha-2.69.0a0-py3-none-any.whl", hash = "sha256:07500b7c0c7919f75ee24a67eef3fc0c3107e8b1dbb4b5fa6888ce284fcbb53b"}, + {file = "aws-cdk.aws-apigatewayv2-alpha-2.75.0a0.tar.gz", hash = "sha256:1348c29ab83cccfe82ba0e34b97153a81f09391cdfab22b83d7d6390444bc551"}, + {file = "aws_cdk.aws_apigatewayv2_alpha-2.75.0a0-py3-none-any.whl", hash = "sha256:42e2ecb3b1ec6da1bed0ee3be8dab29b10e92e17fcebfa8cf8a44bb487102332"}, ] [package.dependencies] -aws-cdk-lib = ">=2.69.0,<3.0.0" +aws-cdk-lib = "2.75.0" constructs = ">=10.0.0,<11.0.0" -jsii = ">=1.77.0,<2.0.0" +jsii = ">=1.78.1,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-aws-apigatewayv2-authorizers-alpha" -version = "2.69.0a0" +version = "2.75.0a0" description = "Authorizers for AWS APIGateway V2" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.aws-apigatewayv2-authorizers-alpha-2.69.0a0.tar.gz", hash = "sha256:c27207a38219ccf1b3cac6b9939d9a18aaa7cc195f80e74c553a2a3704034a02"}, - {file = "aws_cdk.aws_apigatewayv2_authorizers_alpha-2.69.0a0-py3-none-any.whl", hash = "sha256:3c31c4308f0a596f3320ed80d9b9c48f4660b3afc0479690c646ecce4344b653"}, + {file = "aws-cdk.aws-apigatewayv2-authorizers-alpha-2.75.0a0.tar.gz", hash = "sha256:0b9407cef4d46b41e44433952ed4ca00cae651437f3f532bf942f1d719abe43e"}, + {file = "aws_cdk.aws_apigatewayv2_authorizers_alpha-2.75.0a0-py3-none-any.whl", hash = "sha256:306e1ff0c919fc528ff1b69a6210870958f6e028266f5aba842ffcf74c3728ac"}, ] [package.dependencies] -"aws-cdk.aws-apigatewayv2-alpha" = "2.69.0.a0" -aws-cdk-lib = ">=2.69.0,<3.0.0" +"aws-cdk.aws-apigatewayv2-alpha" = "2.75.0.a0" +aws-cdk-lib = "2.75.0" constructs = ">=10.0.0,<11.0.0" -jsii = ">=1.77.0,<2.0.0" +jsii = ">=1.78.1,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-aws-apigatewayv2-integrations-alpha" -version = "2.69.0a0" +version = "2.75.0a0" description = "Integrations for AWS APIGateway V2" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk.aws-apigatewayv2-integrations-alpha-2.69.0a0.tar.gz", hash = "sha256:04d3a24da2bee46e4eac70fd0bfb0e4d8a5e9eca1da459dd21d163d0858c72f6"}, - {file = "aws_cdk.aws_apigatewayv2_integrations_alpha-2.69.0a0-py3-none-any.whl", hash = "sha256:20d3950c1eb57652173b9b1d4a0641941ae76c5458e06eae0b8ecc97b3d6e81f"}, + {file = "aws-cdk.aws-apigatewayv2-integrations-alpha-2.75.0a0.tar.gz", hash = "sha256:355e8980d886f50c37395b022647d31c0d071943f181de1d1f0c162055a3af39"}, + {file = "aws_cdk.aws_apigatewayv2_integrations_alpha-2.75.0a0-py3-none-any.whl", hash = "sha256:75c442ee356e782d81613266efcd2520cee2abed482928ada2d16f457f829692"}, ] [package.dependencies] -"aws-cdk.aws-apigatewayv2-alpha" = "2.69.0.a0" -aws-cdk-lib = ">=2.69.0,<3.0.0" +"aws-cdk.aws-apigatewayv2-alpha" = "2.75.0.a0" +aws-cdk-lib = "2.75.0" constructs = ">=10.0.0,<11.0.0" -jsii = ">=1.77.0,<2.0.0" +jsii = ">=1.78.1,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" [[package]] name = "aws-cdk-lib" -version = "2.74.0" +version = "2.75.0" description = "Version 2 of the AWS Cloud Development Kit library" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "aws-cdk-lib-2.74.0.tar.gz", hash = "sha256:4cf4fe1c1278ae52d0faec4ef9ba34ea2d936045513fd61e63f58d20391a5805"}, - {file = "aws_cdk_lib-2.74.0-py3-none-any.whl", hash = "sha256:1ef84ae12a711298bfc0c14189284114466b0f14672f38a934a900120dbb6db7"}, + {file = "aws-cdk-lib-2.75.0.tar.gz", hash = "sha256:e81e328906577a79d8bb2980403e37a83645f8a883ba5c1309b399b5e0d1baae"}, + {file = "aws_cdk_lib-2.75.0-py3-none-any.whl", hash = "sha256:eb11341f2dc7134a354087396b2efcd952f54f3cff18c5c55a281cd6c45fc821"}, ] [package.dependencies] @@ -301,18 +301,18 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "boto3" -version = "1.26.94" +version = "1.26.115" description = "The AWS SDK for Python" category = "main" optional = false python-versions = ">= 3.7" files = [ - {file = "boto3-1.26.94-py3-none-any.whl", hash = "sha256:619022059e255731f33cd9fe083b8fd62406efcbc07dc15660037bcaa1ba1255"}, - {file = "boto3-1.26.94.tar.gz", hash = "sha256:9f156f4da4b0a15924196e1a8e3439d1b99cd4a463588e4bb103d1cfaf5618fa"}, + {file = "boto3-1.26.115-py3-none-any.whl", hash = "sha256:deb53ad15ff0e75ae0be6d7115a2d34e4bafb0541484485f0feb61dabdfb5513"}, + {file = "boto3-1.26.115.tar.gz", hash = "sha256:2272a060005bf8299f7342cbf1344304eb44b7060cddba6784f676e3bc737bb8"}, ] [package.dependencies] -botocore = ">=1.29.94,<1.30.0" +botocore = ">=1.29.115,<1.30.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.6.0,<0.7.0" @@ -321,14 +321,14 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.29.94" +version = "1.29.115" description = "Low-level, data-driven core of boto 3." category = "main" optional = false python-versions = ">= 3.7" files = [ - {file = "botocore-1.29.94-py3-none-any.whl", hash = "sha256:01b9e066b9eea719ee852e91841b92c7371f6bd388cf6186b5d55508e0f7fa1b"}, - {file = "botocore-1.29.94.tar.gz", hash = "sha256:3748b79e6fc95c19d890aa7439a53b9d468a4c4918439b2ba5cc3c13bfaff817"}, + {file = "botocore-1.29.115-py3-none-any.whl", hash = "sha256:dff327977d7c9f98f2dc54b51b8f70326952dd50ae23b885fdfa8bfeec014b76"}, + {file = "botocore-1.29.115.tar.gz", hash = "sha256:58eee8cf8f4f3e515df29f6dc535dd86ed3f4cea40999c5bc74640ff40bdc71f"}, ] [package.dependencies] @@ -519,18 +519,18 @@ files = [ [[package]] name = "constructs" -version = "10.1.283" +version = "10.1.314" description = "A programming model for software-defined state" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "constructs-10.1.283-py3-none-any.whl", hash = "sha256:cb045cda84777e2288a053463685c8b453039029370e85beb778e94655b288d7"}, - {file = "constructs-10.1.283.tar.gz", hash = "sha256:fd41f311a94d36671cd731cfdfaeadd8e939c7c2d169e1983f374444e7e7171f"}, + {file = "constructs-10.1.314-py3-none-any.whl", hash = "sha256:852faf1acbb74355f172f4f4ead8029d085c0ad46e4a131203d216917a588daa"}, + {file = "constructs-10.1.314.tar.gz", hash = "sha256:389c336c0f91471232dee07e3dbd7a218d85f99b07423c3f93e326d68fb2d857"}, ] [package.dependencies] -jsii = ">=1.78.1,<2.0.0" +jsii = ">=1.80.0,<2.0.0" publication = ">=0.0.3" typeguard = ">=2.13.3,<2.14.0" @@ -929,14 +929,14 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "httpcore" -version = "0.16.3" +version = "0.17.0" description = "A minimal low-level HTTP client." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, - {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, + {file = "httpcore-0.17.0-py3-none-any.whl", hash = "sha256:0fdfea45e94f0c9fd96eab9286077f9ff788dd186635ae61b312693e4d943599"}, + {file = "httpcore-0.17.0.tar.gz", hash = "sha256:cc045a3241afbf60ce056202301b4d8b6af08845e3294055eb26b09913ef903c"}, ] [package.dependencies] @@ -1208,14 +1208,14 @@ pbr = "*" [[package]] name = "jsii" -version = "1.78.1" +version = "1.80.0" description = "Python client for jsii runtime" category = "dev" optional = false python-versions = "~=3.7" files = [ - {file = "jsii-1.78.1-py3-none-any.whl", hash = "sha256:63021b4465c56603f17c4c690cf4da55bf4cb26f0e59e085436ccbd72efe8dd0"}, - {file = "jsii-1.78.1.tar.gz", hash = "sha256:58f5d223e16efb8bc4b7911dbcaf6d6ac43fe2bd51ae7ec7db4bc7d79a333df3"}, + {file = "jsii-1.80.0-py3-none-any.whl", hash = "sha256:ea3cace063f6a47cdf0a74c929618d779efab426fedb7692a8ac1b9b29797f8c"}, + {file = "jsii-1.80.0.tar.gz", hash = "sha256:4da63ab99f2696cd063574460c94221f0a7de9d345e71dfb19dfbcecf8ca8355"}, ] [package.dependencies] @@ -1871,14 +1871,14 @@ test = ["codecov (>=2.1)", "pytest (>=6.2)", "pytest-cov (>=2.12)"] [[package]] name = "packaging" -version = "23.0" +version = "23.1" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, - {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] [[package]] @@ -1935,22 +1935,22 @@ files = [ [[package]] name = "platformdirs" -version = "3.1.1" +version = "3.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, - {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, + {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"}, + {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"}, ] [package.dependencies] -typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} +typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""} [package.extras] docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" @@ -2110,14 +2110,14 @@ files = [ [[package]] name = "pygments" -version = "2.14.0" +version = "2.15.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "Pygments-2.14.0-py3-none-any.whl", hash = "sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717"}, - {file = "Pygments-2.14.0.tar.gz", hash = "sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297"}, + {file = "Pygments-2.15.0-py3-none-any.whl", hash = "sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094"}, + {file = "Pygments-2.15.0.tar.gz", hash = "sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500"}, ] [package.extras] @@ -2136,14 +2136,14 @@ files = [ [[package]] name = "pymdown-extensions" -version = "9.10" +version = "9.11" description = "Extension pack for Python Markdown." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pymdown_extensions-9.10-py3-none-any.whl", hash = "sha256:31eaa76ce6f96aabfcea98787c2fff2c5c0611b20a53a94213970cfbf05f02b8"}, - {file = "pymdown_extensions-9.10.tar.gz", hash = "sha256:562c38eee4ce3f101ce631b804bfc2177a8a76c7e4dc908871fb6741a90257a7"}, + {file = "pymdown_extensions-9.11-py3-none-any.whl", hash = "sha256:a499191d8d869f30339de86fcf072a787e86c42b6f16f280f5c2cf174182b7f3"}, + {file = "pymdown_extensions-9.11.tar.gz", hash = "sha256:f7e86c1d3981f23d9dc43294488ecb54abadd05b0be4bf8f0e15efc90f7853ff"}, ] [package.dependencies] @@ -2603,14 +2603,14 @@ py = ">=1.4.26,<2.0.0" [[package]] name = "rich" -version = "13.3.2" +version = "13.3.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" category = "dev" optional = false python-versions = ">=3.7.0" files = [ - {file = "rich-13.3.2-py3-none-any.whl", hash = "sha256:a104f37270bf677148d8acb07d33be1569eeee87e2d1beb286a4e9113caf6f2f"}, - {file = "rich-13.3.2.tar.gz", hash = "sha256:91954fe80cfb7985727a467ca98a7618e5dd15178cc2da10f553b36a93859001"}, + {file = "rich-13.3.4-py3-none-any.whl", hash = "sha256:22b74cae0278fd5086ff44144d3813be1cedc9115bdfabbfefd86400cb88b20a"}, + {file = "rich-13.3.4.tar.gz", hash = "sha256:b5d573e13605423ec80bdd0cd5f8541f7844a0e71a13f74cf454ccb2f490708b"}, ] [package.dependencies] @@ -2813,14 +2813,14 @@ types-urllib3 = "<1.27" [[package]] name = "types-urllib3" -version = "1.26.25.8" +version = "1.26.25.10" description = "Typing stubs for urllib3" category = "dev" optional = false python-versions = "*" files = [ - {file = "types-urllib3-1.26.25.8.tar.gz", hash = "sha256:ecf43c42d8ee439d732a1110b4901e9017a79a38daca26f08e42c8460069392c"}, - {file = "types_urllib3-1.26.25.8-py3-none-any.whl", hash = "sha256:95ea847fbf0bf675f50c8ae19a665baedcf07e6b4641662c4c3c72e7b2edf1a9"}, + {file = "types-urllib3-1.26.25.10.tar.gz", hash = "sha256:c44881cde9fc8256d05ad6b21f50c4681eb20092552351570ab0a8a0653286d6"}, + {file = "types_urllib3-1.26.25.10-py3-none-any.whl", hash = "sha256:12c744609d588340a07e45d333bf870069fc8793bcf96bae7a96d4712a42591d"}, ] [[package]] @@ -3035,4 +3035,4 @@ validation = ["fastjsonschema"] [metadata] lock-version = "2.0" python-versions = "^3.7.4" -content-hash = "7d512bca260ee0a5f8e74c7e71f230973f9c34864f1a501661ead575068098e2" +content-hash = "ffe8a051efdfcacf7d64eee522f7e9c1a1260aa605e4ba68dec7e3d5330d0979" diff --git a/pyproject.toml b/pyproject.toml index 2d824125577..361ef7a6dae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ mkdocs-git-revision-date-plugin = "^0.3.2" mike = "^1.1.2" retry = "^0.9.2" pytest-xdist = "^3.2.1" -aws-cdk-lib = "^2.74.0" +aws-cdk-lib = "^2.75.0" "aws-cdk.aws-apigatewayv2-alpha" = "^2.38.1-alpha.0" "aws-cdk.aws-apigatewayv2-integrations-alpha" = "^2.38.1-alpha.0" "aws-cdk.aws-apigatewayv2-authorizers-alpha" = "^2.38.1-alpha.0" diff --git a/tests/e2e/idempotency/handlers/function_thread_safety_handler.py b/tests/e2e/idempotency/handlers/function_thread_safety_handler.py index 6e23759b29e..a4644aa61c3 100644 --- a/tests/e2e/idempotency/handlers/function_thread_safety_handler.py +++ b/tests/e2e/idempotency/handlers/function_thread_safety_handler.py @@ -21,7 +21,7 @@ def record_handler(record): def lambda_handler(event, context): with ThreadPoolExecutor(max_workers=threads_count) as executor: - futures = [executor.submit(record_handler, **{"record": event}) for _ in range(threads_count)] + futures = [executor.submit(record_handler, **{"record": i}) for i in range(threads_count)] return [ {"state": future._state, "exception": future.exception(), "output": future.result()} diff --git a/tests/e2e/utils/infrastructure.py b/tests/e2e/utils/infrastructure.py index 29e45b83abf..e827841c52c 100644 --- a/tests/e2e/utils/infrastructure.py +++ b/tests/e2e/utils/infrastructure.py @@ -95,12 +95,12 @@ def create_lambda_functions( self.create_lambda_functions() ``` - Creating Lambda functions and override runtime to Python 3.7 + Creating Lambda functions and override runtime to Python 3.10 ```python from aws_cdk.aws_lambda import Runtime - self.create_lambda_functions(function_props={"runtime": Runtime.PYTHON_3_7) + self.create_lambda_functions(function_props={"runtime": Runtime.PYTHON_3_10) ``` """ if not self._handlers_dir.exists(): @@ -115,6 +115,7 @@ def create_lambda_functions( Runtime.PYTHON_3_7, Runtime.PYTHON_3_8, Runtime.PYTHON_3_9, + Runtime.PYTHON_3_10, ], compatible_architectures=[architecture], code=Code.from_asset(path=layer_build), @@ -138,7 +139,7 @@ def create_lambda_functions( "code": source, "handler": f"{fn_name}.lambda_handler", "tracing": Tracing.ACTIVE, - "runtime": Runtime.PYTHON_3_9, + "runtime": self._determine_runtime_version(), "layers": [layer], "architecture": architecture, **function_settings_override, @@ -243,6 +244,20 @@ def _create_temp_cdk_app(self): temp_file.chmod(0o755) return temp_file + def _determine_runtime_version(self) -> Runtime: + """Determine Python runtime version based on the current Python interpreter""" + version = sys.version_info + if version.major == 3 and version.minor == 7: + return Runtime.PYTHON_3_7 + elif version.major == 3 and version.minor == 8: + return Runtime.PYTHON_3_8 + elif version.major == 3 and version.minor == 9: + return Runtime.PYTHON_3_9 + elif version.major == 3 and version.minor == 10: + return Runtime.PYTHON_3_10 + else: + raise Exception(f"Unsupported Python version: {version}") + def create_resources(self) -> None: """Create any necessary CDK resources. It'll be called before deploy From b4704b43b65b50327e7a12ed9677d5e592da5bed Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Tue, 18 Apr 2023 20:17:04 +0200 Subject: [PATCH 21/22] fix: enable python 3.10 on SAR template --- layer/sar/template.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layer/sar/template.txt b/layer/sar/template.txt index 9d0818b7980..a8a97fbfeae 100644 --- a/layer/sar/template.txt +++ b/layer/sar/template.txt @@ -14,7 +14,7 @@ Metadata: SourceCodeUrl: https://github.com/awslabs/aws-lambda-powertools-python Transform: AWS::Serverless-2016-10-31 -Description: AWS Lambda Layer for aws-lambda-powertools with python 3.9, 3.8 or 3.7 +Description: AWS Lambda Layer for aws-lambda-powertools with python 3.10, 3.9, 3.8 or 3.7 Resources: LambdaLayer: @@ -24,6 +24,7 @@ Resources: LayerName: ContentUri: CompatibleRuntimes: + - python3.10 - python3.9 - python3.8 - python3.7 From c44a45c80caea13efddf65a7fdbc9e8af2c0a1e3 Mon Sep 17 00:00:00 2001 From: Release bot Date: Tue, 18 Apr 2023 18:27:16 +0000 Subject: [PATCH 22/22] chore: update v2 layer ARN on documentation --- docs/index.md | 128 ++++++++++++++--------------- examples/logger/sam/template.yaml | 2 +- examples/metrics/sam/template.yaml | 2 +- examples/tracer/sam/template.yaml | 2 +- 4 files changed, 67 insertions(+), 67 deletions(-) diff --git a/docs/index.md b/docs/index.md index 6b0db547dea..4c193cd2f78 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,8 +26,8 @@ Powertools is a developer toolkit to implement Serverless best practices and inc You can install Powertools using one of the following options: -* **Lambda Layer (x86_64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28**](#){: .copyMe}:clipboard: -* **Lambda Layer (arm64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28**](#){: .copyMe}:clipboard: +* **Lambda Layer (x86_64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29**](#){: .copyMe}:clipboard: +* **Lambda Layer (arm64)**: [**arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29**](#){: .copyMe}:clipboard: * **Pip**: **[`pip install "aws-lambda-powertools"`](#){: .copyMe}:clipboard:** ??? question "Using Pip? You might need to install additional dependencies." @@ -78,60 +78,60 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. | Region | Layer ARN | | ---------------- | ---------------------------------------------------------------------------------------------------------- | - | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | - | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:28](#){: .copyMe}:clipboard: | + | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-south-2` | [arn:aws:lambda:ap-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ap-southeast-4` | [arn:aws:lambda:ap-southeast-4:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-central-2` | [arn:aws:lambda:eu-central-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-south-2` | [arn:aws:lambda:eu-south-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `me-central-1` | [arn:aws:lambda:me-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | + | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2:29](#){: .copyMe}:clipboard: | === "arm64" | Region | Layer ARN | | ---------------- | ---------------------------------------------------------------------------------------------------------------- | - | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | - | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28](#){: .copyMe}:clipboard: | + | `af-south-1` | [arn:aws:lambda:af-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-east-1` | [arn:aws:lambda:ap-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-northeast-1` | [arn:aws:lambda:ap-northeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-northeast-2` | [arn:aws:lambda:ap-northeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-northeast-3` | [arn:aws:lambda:ap-northeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-south-1` | [arn:aws:lambda:ap-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-southeast-1` | [arn:aws:lambda:ap-southeast-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-southeast-2` | [arn:aws:lambda:ap-southeast-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ap-southeast-3` | [arn:aws:lambda:ap-southeast-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `ca-central-1` | [arn:aws:lambda:ca-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `eu-central-1` | [arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `eu-north-1` | [arn:aws:lambda:eu-north-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `eu-south-1` | [arn:aws:lambda:eu-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `eu-west-1` | [arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `eu-west-2` | [arn:aws:lambda:eu-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `eu-west-3` | [arn:aws:lambda:eu-west-3:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `me-south-1` | [arn:aws:lambda:me-south-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `sa-east-1` | [arn:aws:lambda:sa-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `us-east-1` | [arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `us-east-2` | [arn:aws:lambda:us-east-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `us-west-1` | [arn:aws:lambda:us-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | + | `us-west-2` | [arn:aws:lambda:us-west-2:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29](#){: .copyMe}:clipboard: | ??? note "Note: Click to expand and copy code snippets for popular frameworks" @@ -144,7 +144,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. Type: AWS::Serverless::Function Properties: Layers: - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 ``` === "Serverless framework" @@ -154,7 +154,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. hello: handler: lambda_function.lambda_handler layers: - - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 ``` === "CDK" @@ -170,7 +170,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn( self, id="lambda-powertools", - layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28" + layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29" ) aws_lambda.Function(self, 'sample-app-lambda', @@ -219,7 +219,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. role = aws_iam_role.iam_for_lambda.arn handler = "index.test" runtime = "python3.9" - layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28"] + layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29"] source_code_hash = filebase64sha256("lambda_function_payload.zip") } @@ -272,7 +272,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. ? Do you want to configure advanced settings? Yes ... ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 ❯ amplify push -y @@ -283,7 +283,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. - Name: ? Which setting do you want to update? Lambda layers configuration ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 ? Do you want to edit the local lambda function now? No ``` @@ -297,7 +297,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. Properties: Architectures: [arm64] Layers: - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29 ``` === "Serverless framework" @@ -308,7 +308,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. handler: lambda_function.lambda_handler architecture: arm64 layers: - - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 + - arn:aws:lambda:${aws:region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29 ``` === "CDK" @@ -324,7 +324,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. powertools_layer = aws_lambda.LayerVersion.from_layer_version_arn( self, id="lambda-powertools", - layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28" + layer_version_arn=f"arn:aws:lambda:{env.region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29" ) aws_lambda.Function(self, 'sample-app-lambda', @@ -374,7 +374,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. role = aws_iam_role.iam_for_lambda.arn handler = "index.test" runtime = "python3.9" - layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28"] + layers = ["arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29"] architectures = ["arm64"] source_code_hash = filebase64sha256("lambda_function_payload.zip") @@ -430,7 +430,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. ? Do you want to configure advanced settings? Yes ... ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29 ❯ amplify push -y @@ -441,7 +441,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. - Name: ? Which setting do you want to update? Lambda layers configuration ? Do you want to enable Lambda layers for this function? Yes - ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:28 + ? Enter up to 5 existing Lambda layer ARNs (comma-separated): arn:aws:lambda:eu-central-1:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:29 ? Do you want to edit the local lambda function now? No ``` @@ -449,7 +449,7 @@ You can include Powertools Lambda Layer using [AWS Lambda Console](https://docs. Change {region} to your AWS region, e.g. `eu-west-1` ```bash title="AWS CLI" - aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 --region {region} + aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 --region {region} ``` The pre-signed URL to download this Lambda Layer will be within `Location` key. diff --git a/examples/logger/sam/template.yaml b/examples/logger/sam/template.yaml index 3fdf5f2742d..ebc81b95174 100644 --- a/examples/logger/sam/template.yaml +++ b/examples/logger/sam/template.yaml @@ -14,7 +14,7 @@ Globals: Layers: # Find the latest Layer version in the official documentation # https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 Resources: LoggerLambdaHandlerExample: diff --git a/examples/metrics/sam/template.yaml b/examples/metrics/sam/template.yaml index 532de6cb335..e3254eead34 100644 --- a/examples/metrics/sam/template.yaml +++ b/examples/metrics/sam/template.yaml @@ -15,7 +15,7 @@ Globals: Layers: # Find the latest Layer version in the official documentation # https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 Resources: CaptureLambdaHandlerExample: diff --git a/examples/tracer/sam/template.yaml b/examples/tracer/sam/template.yaml index 1b3f5d65338..0181c48a0e9 100644 --- a/examples/tracer/sam/template.yaml +++ b/examples/tracer/sam/template.yaml @@ -13,7 +13,7 @@ Globals: Layers: # Find the latest Layer version in the official documentation # https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:28 + - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:29 Resources: CaptureLambdaHandlerExample: