From a1eadd1011b1ffb148d42435dedd4c8b880c2baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAben=20Fonseca?= Date: Fri, 21 Oct 2022 11:51:50 +0200 Subject: [PATCH] fix(ci): remove v2 suffix from SAR apps --- .github/workflows/reusable_deploy_v2_sar.yml | 2 +- docs/index.md | 18 +++++++++--------- layer/sar/template.txt | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/reusable_deploy_v2_sar.yml b/.github/workflows/reusable_deploy_v2_sar.yml index 1a2b9ca0b9a..1d8ddafe2b1 100644 --- a/.github/workflows/reusable_deploy_v2_sar.yml +++ b/.github/workflows/reusable_deploy_v2_sar.yml @@ -16,7 +16,7 @@ permissions: env: NODE_VERSION: 16.12 AWS_REGION: eu-west-1 - SAR_NAME: aws-lambda-powertools-python-layer-v2 + SAR_NAME: aws-lambda-powertools-python-layer TEST_STACK_NAME: serverlessrepo-v2-powertools-layer-test-stack on: diff --git a/docs/index.md b/docs/index.md index 0c4569cd652..46ce53d9ec2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -377,8 +377,8 @@ Despite having more steps compared to the [public Layer ARN](#lambda-layer) opti | App | ARN | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| [aws-lambda-powertools-python-layer-v2](https://serverlessrepo.aws.amazon.com/applications/eu-west-1/057560766410/aws-lambda-powertools-python-layer-v2) | [arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2](#){: .copyMe}:clipboard: | Contains all extra dependencies (e.g: pydantic). | -| [aws-lambda-powertools-python-layer-v2-arm64](https://serverlessrepo.aws.amazon.com/applications/eu-west-1/057560766410/aws-lambda-powertools-python-layer-v2-arm64) | [arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2-arm64](#){: .copyMe}:clipboard: | Contains all extra dependencies (e.g: pydantic). For arm64 functions. | +| [aws-lambda-powertools-python-layer](https://serverlessrepo.aws.amazon.com/applications/eu-west-1/057560766410/aws-lambda-powertools-python-layer) | [arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer](#){: .copyMe}:clipboard: | Contains all extra dependencies (e.g: pydantic). | +| [aws-lambda-powertools-python-layer-arm64](https://serverlessrepo.aws.amazon.com/applications/eu-west-1/057560766410/aws-lambda-powertools-python-layer-arm64) | [arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-arm64](#){: .copyMe}:clipboard: | Contains all extra dependencies (e.g: pydantic). For arm64 functions. | ???+ tip You can create a shared Lambda Layers stack and make this along with other account level layers stack. @@ -392,7 +392,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, Type: AWS::Serverless::Application Properties: Location: - ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2 + ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer SemanticVersion: 2.0.0 # change to latest semantic version available in SAR MyLambdaFunction: @@ -419,7 +419,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, Type: AWS::Serverless::Application Properties: Location: - ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2 + ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer # Find latest from github.com/awslabs/aws-lambda-powertools-python/releases SemanticVersion: 2.0.0 ``` @@ -432,7 +432,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, POWERTOOLS_BASE_NAME = 'AWSLambdaPowertools' # Find latest from github.com/awslabs/aws-lambda-powertools-python/releases POWERTOOLS_VER = '2.0.0' - POWERTOOLS_ARN = 'arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2' + POWERTOOLS_ARN = 'arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer' class SampleApp(core.Construct): @@ -489,7 +489,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, } data "aws_serverlessapplicationrepository_application" "sar_app" { - application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2" + application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer" semantic_version = var.aws_powertools_version } @@ -552,7 +552,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, - serverlessrepo:GetCloudFormationTemplate Resource: # this is arn of the powertools SAR app - - arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2 + - arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer - Sid: S3AccessLayer Effect: Allow Action: @@ -569,7 +569,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack, - lambda:PublishLayerVersion - lambda:GetLayerVersion Resource: - - !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:aws-lambda-powertools-python-layer-v2* + - !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:aws-lambda-powertools-python-layer* Roles: - Ref: "PowertoolsLayerIamRole" ``` @@ -578,7 +578,7 @@ You can fetch available versions via SAR ListApplicationVersions API: ```bash title="AWS CLI example" aws serverlessrepo list-application-versions \ - --application-id arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2 + --application-id arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer ``` ## Quick getting started diff --git a/layer/sar/template.txt b/layer/sar/template.txt index 808e9d7a36a..9d0818b7980 100644 --- a/layer/sar/template.txt +++ b/layer/sar/template.txt @@ -3,7 +3,7 @@ AWSTemplateFormatVersion: '2010-09-09' Metadata: AWS::ServerlessRepo::Application: Name: - Description: "AWS Lambda Layer for aws-lambda-powertools " + Description: "AWS Lambda Layer for aws-lambda-powertools" Author: AWS SpdxLicenseId: Apache-2.0 LicenseUrl: /LICENSE