@@ -31,11 +31,11 @@ Parameters:
3131# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html
3232Globals :
3333 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
3939
4040# Resources declares the AWS resources that you want to include in the stack
4141# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
@@ -76,11 +76,8 @@ Resources:
7676 BuildMethod : esbuild
7777 BuildProperties :
7878 Minify : true
79- Target : " ES2020"
79+ Target : ' ES2020'
8080 Sourcemap : true
81- External :
82- - " @aws-sdk/lib-dynamodb"
83- - " @aws-sdk/client-dynamodb"
8481 EntryPoints :
8582 - src/get-all-items.ts
8683
@@ -93,7 +90,8 @@ Resources:
9390 Policies :
9491 # Give Create/Read/Update/Delete Permissions to the SampleTable
9592 - DynamoDBReadPolicy :
96- TableName : !Ref SampleTable
93+ TableName :
94+ !Ref SampleTable
9795 # add ssm:getParameter permission to the function
9896 - SSMParameterWithSlashPrefixReadPolicy :
9997 ParameterName : !Ref uuidApiUrlParameter
@@ -118,11 +116,8 @@ Resources:
118116 BuildMethod : esbuild
119117 BuildProperties :
120118 Minify : true
121- Target : " ES2020"
119+ Target : ' ES2020'
122120 Sourcemap : true
123- External :
124- - " @aws-sdk/lib-dynamodb"
125- - " @aws-sdk/client-dynamodb"
126121 EntryPoints :
127122 - src/get-by-id.ts
128123
@@ -156,10 +151,8 @@ Resources:
156151 BuildMethod : esbuild
157152 BuildProperties :
158153 Minify : true
159- Target : " ES2020"
154+ Target : ' ES2020'
160155 Sourcemap : true
161- External :
162- - " uuid"
163156 EntryPoints :
164157 - src/get-uuid.ts
165158
@@ -169,9 +162,8 @@ Resources:
169162 Properties :
170163 Name : /app/uuid-api-url
171164 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}/'
175167
176168 # This is a Lambda function config associated with the source code: put-item.js
177169 putItemFunction :
@@ -206,11 +198,8 @@ Resources:
206198 BuildMethod : esbuild
207199 BuildProperties :
208200 Minify : true
209- Target : " ES2020"
201+ Target : ' ES2020'
210202 Sourcemap : true
211- External :
212- - " @aws-sdk/lib-dynamodb"
213- - " @aws-sdk/client-dynamodb"
214203 EntryPoints :
215204 - src/put-item.ts
216205
@@ -226,7 +215,7 @@ Resources:
226215 Type : AWS::ApiGateway::RestApi
227216 Properties :
228217 Name : !Sub ${AWS::StackName}-uuid-api
229- Description : " Example API for UUID generation"
218+ Description : ' Example API for UUID generation'
230219
231220 apiGatewayDeployment :
232221 Type : AWS::ApiGateway::Deployment
@@ -290,7 +279,6 @@ Resources:
290279 RetentionInDays : 1
291280
292281Outputs :
293-
294282 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