Skip to content

Commit aa0de8b

Browse files
fix: Add ProjectName parameter to template.yaml
- Add ProjectName parameter to Parameters section - Fix PROJECT_NAME references to use ProjectName parameter - Update LayerName and Export Name to use ProjectName - This resolves CloudFormation template format error
1 parent 87e5ed3 commit aa0de8b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

template.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ AWSTemplateFormatVersion: '2010-09-09'
33
Transform: AWS::Serverless-2016-10-31
44

55
Parameters:
6+
ProjectName:
7+
Type: String
8+
Default: LambdaFramework
9+
Description: Project name for the Lambda layer
610
Environment:
711
Type: String
812
Default: development
@@ -15,8 +19,8 @@ Resources:
1519
LambdaFramework:
1620
Type: AWS::Serverless::LayerVersion
1721
Properties:
18-
LayerName: !Sub "${PROJECT_NAME}-${Environment}"
19-
Description: !Sub "Safe retry and stop framework - ${Environment}"
22+
LayerName: !Sub "${ProjectName}"
23+
Description: !Sub "Safe retry and stop framework"
2024
ContentUri: LambdaFramework
2125
RetentionPolicy: Retain
2226
CompatibleRuntimes:
@@ -27,7 +31,4 @@ Outputs:
2731
LambdaFramework:
2832
Value: !Ref LambdaFramework
2933
Export:
30-
Name: !Sub "Layer-${PROJECT_NAME}-${Environment}"
31-
Environment:
32-
Value: !Ref Environment
33-
Description: Deployed environment
34+
Name: !Sub "Layer-${ProjectName}"

0 commit comments

Comments
 (0)