@@ -31,11 +31,11 @@ Parameters:
31
31
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html
32
32
Globals :
33
33
Function :
34
- Runtime : nodejs18.x
35
- Architectures :
36
- - x86_64
37
- MemorySize : 128
38
- Timeout : 100
34
+ Runtime : nodejs18.x
35
+ Architectures :
36
+ - x86_64
37
+ MemorySize : 128
38
+ Timeout : 100
39
39
40
40
# Resources declares the AWS resources that you want to include in the stack
41
41
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
@@ -76,11 +76,8 @@ Resources:
76
76
BuildMethod : esbuild
77
77
BuildProperties :
78
78
Minify : true
79
- Target : " ES2020"
79
+ Target : ' ES2020'
80
80
Sourcemap : true
81
- External :
82
- - " @aws-sdk/lib-dynamodb"
83
- - " @aws-sdk/client-dynamodb"
84
81
EntryPoints :
85
82
- src/get-all-items.ts
86
83
@@ -93,7 +90,8 @@ Resources:
93
90
Policies :
94
91
# Give Create/Read/Update/Delete Permissions to the SampleTable
95
92
- DynamoDBReadPolicy :
96
- TableName : !Ref SampleTable
93
+ TableName :
94
+ !Ref SampleTable
97
95
# add ssm:getParameter permission to the function
98
96
- SSMParameterWithSlashPrefixReadPolicy :
99
97
ParameterName : !Ref uuidApiUrlParameter
@@ -118,11 +116,8 @@ Resources:
118
116
BuildMethod : esbuild
119
117
BuildProperties :
120
118
Minify : true
121
- Target : " ES2020"
119
+ Target : ' ES2020'
122
120
Sourcemap : true
123
- External :
124
- - " @aws-sdk/lib-dynamodb"
125
- - " @aws-sdk/client-dynamodb"
126
121
EntryPoints :
127
122
- src/get-by-id.ts
128
123
@@ -156,10 +151,8 @@ Resources:
156
151
BuildMethod : esbuild
157
152
BuildProperties :
158
153
Minify : true
159
- Target : " ES2020"
154
+ Target : ' ES2020'
160
155
Sourcemap : true
161
- External :
162
- - " uuid"
163
156
EntryPoints :
164
157
- src/get-uuid.ts
165
158
@@ -169,9 +162,8 @@ Resources:
169
162
Properties :
170
163
Name : /app/uuid-api-url
171
164
Type : String
172
- Description : " Example parameter for UUID API URL"
173
- Value : !Sub "https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/${apiGatewayStageName}/"
174
-
165
+ Description : ' Example parameter for UUID API URL'
166
+ Value : !Sub 'https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/${apiGatewayStageName}/'
175
167
176
168
# This is a Lambda function config associated with the source code: put-item.js
177
169
putItemFunction :
@@ -206,11 +198,8 @@ Resources:
206
198
BuildMethod : esbuild
207
199
BuildProperties :
208
200
Minify : true
209
- Target : " ES2020"
201
+ Target : ' ES2020'
210
202
Sourcemap : true
211
- External :
212
- - " @aws-sdk/lib-dynamodb"
213
- - " @aws-sdk/client-dynamodb"
214
203
EntryPoints :
215
204
- src/put-item.ts
216
205
@@ -226,7 +215,7 @@ Resources:
226
215
Type : AWS::ApiGateway::RestApi
227
216
Properties :
228
217
Name : !Sub ${AWS::StackName}-uuid-api
229
- Description : " Example API for UUID generation"
218
+ Description : ' Example API for UUID generation'
230
219
231
220
apiGatewayDeployment :
232
221
Type : AWS::ApiGateway::Deployment
@@ -290,7 +279,6 @@ Resources:
290
279
RetentionInDays : 1
291
280
292
281
Outputs :
293
-
294
282
UuidWebEndpoint :
295
- Description : " API Gateway endpoint URL for UUID endpoint"
296
- Value : !Sub " https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/dev/"
283
+ Description : ' API Gateway endpoint URL for UUID endpoint'
284
+ Value : !Sub ' https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/dev/'
0 commit comments