Skip to content

Commit 21ab862

Browse files
committed
refactor: lambda function name
1 parent a109c8f commit 21ab862

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

Diff for: template.yaml

+7-21
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ Resources:
7575
GetAllUsersV1Function:
7676
Type: AWS::Serverless::Function
7777
Properties:
78-
FunctionName: !Sub
79-
- ${StackName}-GetAllUsersV1
80-
- { StackName: !Ref AWS::StackName }
78+
FunctionName: !Sub ${AWS::StackName}-GetAllUsersV1
8179
Description: Get all users v1
8280
Events:
8381
API:
@@ -107,9 +105,7 @@ Resources:
107105
GetUserV1Function:
108106
Type: AWS::Serverless::Function
109107
Properties:
110-
FunctionName: !Sub
111-
- ${StackName}-GetUserV1
112-
- { StackName: !Ref AWS::StackName }
108+
FunctionName: !Sub ${AWS::StackName}-GetUserV1
113109
Description: Get user v1
114110
Events:
115111
API:
@@ -139,9 +135,7 @@ Resources:
139135
CreateUserV1Function:
140136
Type: AWS::Serverless::Function
141137
Properties:
142-
FunctionName: !Sub
143-
- ${StackName}-CreateUserV1
144-
- { StackName: !Ref AWS::StackName }
138+
FunctionName: !Sub ${AWS::StackName}-CreateUserV1
145139
Description: Create user v1
146140
Events:
147141
API:
@@ -172,9 +166,7 @@ Resources:
172166
UpdateUserV1Function:
173167
Type: AWS::Serverless::Function
174168
Properties:
175-
FunctionName: !Sub
176-
- ${StackName}-UpdateUserV1
177-
- { StackName: !Ref AWS::StackName }
169+
FunctionName: !Sub ${AWS::StackName}-UpdateUserV1
178170
Description: Update user v1
179171
Events:
180172
API:
@@ -204,9 +196,7 @@ Resources:
204196
DeleteUserV1Function:
205197
Type: AWS::Serverless::Function
206198
Properties:
207-
FunctionName: !Sub
208-
- ${StackName}-DeleteUserV1
209-
- { StackName: !Ref AWS::StackName }
199+
FunctionName: !Sub ${AWS::StackName}-DeleteUserV1
210200
Description: Delete user v1
211201
Events:
212202
API:
@@ -238,9 +228,7 @@ Resources:
238228
# GetUserV2Function:
239229
# Type: AWS::Serverless::Function
240230
# Properties:
241-
# FunctionName: !Sub
242-
# - ${StackName}-GetUserV2
243-
# - { StackName: !Ref AWS::StackName }
231+
# FunctionName: !Sub ${AWS::StackName}-GetUserV2
244232
# Description: Get user from DynamoDB v2
245233
# Events:
246234
# API:
@@ -270,9 +258,7 @@ Resources:
270258
# CreateUserV2Function:
271259
# Type: AWS::Serverless::Function
272260
# Properties:
273-
# FunctionName: !Sub
274-
# - ${StackName}-CreateUserV2
275-
# - { StackName: !Ref AWS::StackName }
261+
# FunctionName: !Sub ${AWS::StackName}-CreateUserV2
276262
# Description: Save user to DynamoDB v2
277263
# Events:
278264
# API:

0 commit comments

Comments
 (0)