@@ -100,17 +100,17 @@ Resources:
100
100
- DomainName: !Sub "${SubDomainName}<%= config[:Suffix]%> .${BaseDomainName}"
101
101
HostedZoneId: !Ref BaseDomainNameHostedZonedID
102
102
103
- <%= config[:Prefix]%> DomainNameAPIMapping :
103
+ <%= config[:Prefix]%> DomainNameApiMapping :
104
104
Type: AWS::ApiGatewayV2::ApiMapping
105
105
DependsOn:
106
106
- <%= config[:Prefix]%> Domain
107
107
Properties:
108
- ApiId: !Ref <%= apiName%> API
108
+ ApiId: !Ref <%= apiName%> Api
109
109
DomainName: !Sub "${SubDomainName}<%= config[:Suffix]%> .${BaseDomainName}"
110
110
Stage: !Ref <%= apiName%> Stage
111
111
112
112
<% end -%>
113
- HttpAPI :
113
+ HttpApi :
114
114
Type: AWS::ApiGatewayV2::Api
115
115
Properties:
116
116
Name: !Sub "${SubDomainName}-http.${BaseDomainName}"
@@ -119,7 +119,7 @@ Resources:
119
119
PutRoute:
120
120
Type: AWS::ApiGatewayV2::Route
121
121
Properties:
122
- ApiId: !Ref HttpAPI
122
+ ApiId: !Ref HttpApi
123
123
RouteKey: PUT /seedsources/sources.json
124
124
AuthorizationType: CUSTOM
125
125
AuthorizerId: !Ref HttpAuthorizer
@@ -143,7 +143,7 @@ Resources:
143
143
PutSourcesPermission:
144
144
Type: AWS::Lambda::Permission
145
145
DependsOn:
146
- - HttpAPI
146
+ - HttpApi
147
147
Properties:
148
148
Action: lambda:InvokeFunction
149
149
FunctionName: !Ref PutSourcesFunction
@@ -152,7 +152,7 @@ Resources:
152
152
PutIntegration:
153
153
Type: AWS::ApiGatewayV2::Integration
154
154
Properties:
155
- ApiId: !Ref HttpAPI
155
+ ApiId: !Ref HttpApi
156
156
Description: PUT Integration
157
157
# Integration method must be POST for AWS_PROXY integrations even though we're PUTting into an S3 bucket
158
158
IntegrationMethod: POST
@@ -175,7 +175,7 @@ Resources:
175
175
AutoDeploy: true
176
176
StageName: !Sub "${StageName}"
177
177
Description: The stage to deploy
178
- ApiId: !Ref HttpAPI
178
+ ApiId: !Ref HttpApi
179
179
DefaultRouteSettings:
180
180
DetailedMetricsEnabled: true
181
181
AccessLogSettings:
@@ -202,7 +202,7 @@ Resources:
202
202
HttpAuthorizer:
203
203
Type: AWS::ApiGatewayV2::Authorizer
204
204
Properties:
205
- ApiId: !Ref HttpAPI
205
+ ApiId: !Ref HttpApi
206
206
AuthorizerCredentialsArn:
207
207
Fn::ImportValue: JavabuilderAPIGatewayRole
208
208
AuthorizerPayloadFormatVersion: 2.0
@@ -213,7 +213,7 @@ Resources:
213
213
- "$request.querystring.Authorization"
214
214
Name: HttpAuthorizer
215
215
216
- WebSocketAPI :
216
+ WebSocketApi :
217
217
Type: AWS::ApiGatewayV2::Api
218
218
Properties:
219
219
Name: !Sub "${SubDomainName}.${BaseDomainName}"
@@ -223,7 +223,7 @@ Resources:
223
223
ConnectRoute:
224
224
Type: AWS::ApiGatewayV2::Route
225
225
Properties:
226
- ApiId: !Ref WebSocketAPI
226
+ ApiId: !Ref WebSocketApi
227
227
RouteKey: $connect
228
228
AuthorizationType: CUSTOM
229
229
AuthorizerId: !Ref WebSocketAuthorizer
@@ -236,7 +236,7 @@ Resources:
236
236
WebSocketAuthorizer:
237
237
Type: AWS::ApiGatewayV2::Authorizer
238
238
Properties:
239
- ApiId: !Ref WebSocketAPI
239
+ ApiId: !Ref WebSocketApi
240
240
AuthorizerType: REQUEST
241
241
AuthorizerUri: !Sub "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${WebsocketAuthorizerLambda.Arn}/invocations"
242
242
IdentitySource:
@@ -246,7 +246,7 @@ Resources:
246
246
ConnectInteg:
247
247
Type: AWS::ApiGatewayV2::Integration
248
248
Properties:
249
- ApiId: !Ref WebSocketAPI
249
+ ApiId: !Ref WebSocketApi
250
250
Description: Connect Integration
251
251
IntegrationType: AWS_PROXY
252
252
IntegrationUri:
@@ -256,7 +256,7 @@ Resources:
256
256
DefaultRoute:
257
257
Type: AWS::ApiGatewayV2::Route
258
258
Properties:
259
- ApiId: !Ref WebSocketAPI
259
+ ApiId: !Ref WebSocketApi
260
260
RouteKey: $default
261
261
AuthorizationType: NONE
262
262
OperationName: DefaultRoute
@@ -269,15 +269,15 @@ Resources:
269
269
DefaultIntegration:
270
270
Type: AWS::ApiGatewayV2::Integration
271
271
Properties:
272
- ApiId: !Ref WebSocketAPI
272
+ ApiId: !Ref WebSocketApi
273
273
Description: Lambda Proxy Integration
274
274
IntegrationType: AWS_PROXY
275
275
IntegrationUri: !Sub "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${StartSessionAndRelayMessagesFunction.Arn}/invocations"
276
276
277
277
DisconnectRoute:
278
278
Type: AWS::ApiGatewayV2::Route
279
279
Properties:
280
- ApiId: !Ref WebSocketAPI
280
+ ApiId: !Ref WebSocketApi
281
281
RouteKey: $disconnect
282
282
AuthorizationType: NONE
283
283
OperationName: DisconnectRoute
@@ -289,7 +289,7 @@ Resources:
289
289
DisconnectInteg:
290
290
Type: AWS::ApiGatewayV2::Integration
291
291
Properties:
292
- ApiId: !Ref WebSocketAPI
292
+ ApiId: !Ref WebSocketApi
293
293
Description: Disconnect Integration
294
294
IntegrationType: AWS_PROXY
295
295
IntegrationUri:
@@ -303,15 +303,15 @@ Resources:
303
303
- DefaultRoute
304
304
- DisconnectRoute
305
305
Properties:
306
- ApiId: !Ref WebSocketAPI
306
+ ApiId: !Ref WebSocketApi
307
307
308
308
WebSocketStage:
309
309
Type: AWS::ApiGatewayV2::Stage
310
310
Properties:
311
311
StageName: !Sub "${StageName}"
312
312
Description: The stage to deploy
313
313
DeploymentId: !Ref WebSocketDeployment
314
- ApiId: !Ref WebSocketAPI
314
+ ApiId: !Ref WebSocketApi
315
315
DefaultRouteSettings:
316
316
DetailedMetricsEnabled: true
317
317
LoggingLevel: INFO
@@ -357,18 +357,12 @@ Resources:
357
357
StartSessionAndRelayMessagesPermission:
358
358
Type: AWS::Lambda::Permission
359
359
DependsOn:
360
- - WebSocketAPI
360
+ - WebSocketApi
361
361
Properties:
362
362
Action: lambda:InvokeFunction
363
363
FunctionName: !Ref StartSessionAndRelayMessagesFunction
364
364
Principal: apigateway.amazonaws.com
365
365
366
- # AWS does not seem to be case sensitive, but is case aware. Therefore, we can't update from
367
- # Websocket here to WebSocket as is used elsewhere when updating an existing stack. Updating this is
368
- # a step we should take when we create our non-beta environment from scratch. At that point, we
369
- # should also update uses of HttpAPI and WebSocketAPI to be HttpApi and WebSocketApi, respectively,
370
- # to match the AWS standard elsewhere in this template. Example: "AWS::ApiGatewayV2::ApiMapping"
371
- #
372
366
# Note: hourly and daily limit values provided to both authorizers here as environment variables,
373
367
# but are only needed in the HTTP authorizer.
374
368
# Both authorizers need to access the token_status DynamoDB table, but only the HTTP authorizer
@@ -380,7 +374,7 @@ Resources:
380
374
Description : "'Authorize PUT by decoding JWT in Authorization querystring parameter.'"
381
375
} ,
382
376
WebSocket : {
383
- LambdaName : "Websocket " ,
377
+ LambdaName : "WebSocket " ,
384
378
Handler : "websocket_authorizer_function" ,
385
379
Description : "'Authorize WebSocket connect by decoding JWT in Authorization querystring parameter.'"
386
380
} ,
@@ -411,7 +405,7 @@ Resources:
411
405
Action: lambda:InvokeFunction
412
406
FunctionName: !Ref <%= config [ :LambdaName ] %> AuthorizerLambda
413
407
Principal: apigateway.amazonaws.com
414
- SourceArn: !Sub "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${<%= name%> API }/authorizers/${<%= name%> Authorizer}"
408
+ SourceArn: !Sub "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${<%= name%> Api }/authorizers/${<%= name%> Authorizer}"
415
409
416
410
<% end -%>
417
411
ChangeJavaRuntimeDirectoryLayer:
@@ -464,7 +458,7 @@ Resources:
464
458
CONTENT_BUCKET_URL: !Sub "https://${ContentDomain}"
465
459
API_ENDPOINT: !Sub
466
460
- "https://${ApiId}.execute-api.${AWS::Region}.amazonaws.com/${StageName}"
467
- - ApiId: !Ref WebSocketAPI
461
+ - ApiId: !Ref WebSocketApi
468
462
<% end -%>
469
463
470
464
ContentBucket:
@@ -497,7 +491,7 @@ Resources:
497
491
Resource: !Sub "arn:aws:s3:::${ContentBucket}/*"
498
492
Principal: '*'
499
493
500
- ContentAPICertificate :
494
+ ContentApiCertificate :
501
495
Type: AWS::CertificateManager::Certificate
502
496
Properties:
503
497
DomainName: !Sub "${SubDomainName}-content.${BaseDomainName}"
@@ -523,7 +517,7 @@ Resources:
523
517
Enabled: true
524
518
Aliases: [!Sub "${SubDomainName}-content.${BaseDomainName}"]
525
519
ViewerCertificate:
526
- AcmCertificateArn: !Ref ContentAPICertificate
520
+ AcmCertificateArn: !Ref ContentApiCertificate
527
521
MinimumProtocolVersion: TLSv1
528
522
SslSupportMethod: sni-only
529
523
CustomErrorResponses:
@@ -607,7 +601,7 @@ Resources:
607
601
- Name: Stage
608
602
Value: !Sub "${StageName}"
609
603
- Name: ApiId
610
- Value: !Ref WebSocketAPI
604
+ Value: !Ref WebSocketApi
611
605
Period: 60
612
606
Stat: Sum
613
607
- Id: ad1
@@ -639,7 +633,7 @@ Resources:
639
633
MetricName: Count
640
634
Dimensions:
641
635
- Name: ApiId
642
- Value: !Ref HttpAPI
636
+ Value: !Ref HttpApi
643
637
Period: 60
644
638
Stat: Sum
645
639
- Id: ad1
0 commit comments