Skip to content

Commit aa39ed2

Browse files
authored
fix(ci): remove v2 suffix from SAR apps (#1633)
1 parent 21522d0 commit aa39ed2

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/workflows/reusable_deploy_v2_sar.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
env:
1717
NODE_VERSION: 16.12
1818
AWS_REGION: eu-west-1
19-
SAR_NAME: aws-lambda-powertools-python-layer-v2
19+
SAR_NAME: aws-lambda-powertools-python-layer
2020
TEST_STACK_NAME: serverlessrepo-v2-powertools-layer-test-stack
2121

2222
on:

docs/index.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ Despite having more steps compared to the [public Layer ARN](#lambda-layer) opti
377377

378378
| App | ARN | Description |
379379
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
380-
| [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). |
381-
| [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. |
380+
| [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). |
381+
| [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. |
382382

383383
???+ tip
384384
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,
392392
Type: AWS::Serverless::Application
393393
Properties:
394394
Location:
395-
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2
395+
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
396396
SemanticVersion: 2.0.0 # change to latest semantic version available in SAR
397397

398398
MyLambdaFunction:
@@ -419,7 +419,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
419419
Type: AWS::Serverless::Application
420420
Properties:
421421
Location:
422-
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2
422+
ApplicationId: arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
423423
# Find latest from github.com/awslabs/aws-lambda-powertools-python/releases
424424
SemanticVersion: 2.0.0
425425
```
@@ -432,7 +432,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
432432
POWERTOOLS_BASE_NAME = 'AWSLambdaPowertools'
433433
# Find latest from github.com/awslabs/aws-lambda-powertools-python/releases
434434
POWERTOOLS_VER = '2.0.0'
435-
POWERTOOLS_ARN = 'arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2'
435+
POWERTOOLS_ARN = 'arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer'
436436

437437
class SampleApp(core.Construct):
438438

@@ -489,7 +489,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
489489
}
490490

491491
data "aws_serverlessapplicationrepository_application" "sar_app" {
492-
application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2"
492+
application_id = "arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer"
493493
semantic_version = var.aws_powertools_version
494494
}
495495

@@ -552,7 +552,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
552552
- serverlessrepo:GetCloudFormationTemplate
553553
Resource:
554554
# this is arn of the powertools SAR app
555-
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2
555+
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
556556
- Sid: S3AccessLayer
557557
Effect: Allow
558558
Action:
@@ -569,7 +569,7 @@ If using SAM, you can include this SAR App as part of your shared Layers stack,
569569
- lambda:PublishLayerVersion
570570
- lambda:GetLayerVersion
571571
Resource:
572-
- !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:aws-lambda-powertools-python-layer-v2*
572+
- !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:aws-lambda-powertools-python-layer*
573573
Roles:
574574
- Ref: "PowertoolsLayerIamRole"
575575
```
@@ -578,7 +578,7 @@ You can fetch available versions via SAR ListApplicationVersions API:
578578

579579
```bash title="AWS CLI example"
580580
aws serverlessrepo list-application-versions \
581-
--application-id arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer-v2
581+
--application-id arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
582582
```
583583

584584
## Quick getting started

layer/sar/template.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AWSTemplateFormatVersion: '2010-09-09'
33
Metadata:
44
AWS::ServerlessRepo::Application:
55
Name: <SAR_APP_NAME>
6-
Description: "AWS Lambda Layer for aws-lambda-powertools "
6+
Description: "AWS Lambda Layer for aws-lambda-powertools"
77
Author: AWS
88
SpdxLicenseId: Apache-2.0
99
LicenseUrl: <LAYER_CONTENT_PATH>/LICENSE

0 commit comments

Comments
 (0)