-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
764 lines (764 loc) · 24.8 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
Resources:
HelloHandlerServiceRole11EF7C63:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: lambda.amazonaws.com
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
Metadata:
aws:cdk:path: CdkWorkshopStack/HelloHandler/ServiceRole/Resource
HelloHandler2E4FBA4D:
Type: AWS::Lambda::Function
Properties:
Code:
S3Bucket:
Fn::Sub: cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}
S3Key: 89490e4a6ba8b96da33859603ff2e0605d4f94d7646cfee96cf030e2cb8304c0.zip
Role:
Fn::GetAtt:
- HelloHandlerServiceRole11EF7C63
- Arn
Handler: hello.handler
Runtime: nodejs14.x
DependsOn:
- HelloHandlerServiceRole11EF7C63
Metadata:
aws:cdk:path: CdkWorkshopStack/HelloHandler/Resource
aws:asset:path: asset.89490e4a6ba8b96da33859603ff2e0605d4f94d7646cfee96cf030e2cb8304c0
aws:asset:is-bundled: false
aws:asset:property: Code
HelloHitCounterHits7AAEBF80:
Type: AWS::DynamoDB::Table
Properties:
KeySchema:
- AttributeName: path
KeyType: HASH
AttributeDefinitions:
- AttributeName: path
AttributeType: S
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
UpdateReplacePolicy: Retain
DeletionPolicy: Retain
Metadata:
aws:cdk:path: CdkWorkshopStack/HelloHitCounter/Hits/Resource
HelloHitCounterHitCounterHandlerServiceRoleD45002B8:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: lambda.amazonaws.com
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
Metadata:
aws:cdk:path: CdkWorkshopStack/HelloHitCounter/HitCounterHandler/ServiceRole/Resource
HelloHitCounterHitCounterHandlerServiceRoleDefaultPolicy1487A60A:
Type: AWS::IAM::Policy
Properties:
PolicyDocument:
Statement:
- Action:
- dynamodb:BatchWriteItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Effect: Allow
Resource:
- Fn::GetAtt:
- HelloHitCounterHits7AAEBF80
- Arn
- Ref: AWS::NoValue
- Action: lambda:InvokeFunction
Effect: Allow
Resource:
Fn::GetAtt:
- HelloHandler2E4FBA4D
- Arn
Version: "2012-10-17"
PolicyName: HelloHitCounterHitCounterHandlerServiceRoleDefaultPolicy1487A60A
Roles:
- Ref: HelloHitCounterHitCounterHandlerServiceRoleD45002B8
Metadata:
aws:cdk:path: CdkWorkshopStack/HelloHitCounter/HitCounterHandler/ServiceRole/DefaultPolicy/Resource
HelloHitCounterHitCounterHandlerDAEA7B37:
Type: AWS::Lambda::Function
Properties:
Code:
S3Bucket:
Fn::Sub: cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}
S3Key: 89490e4a6ba8b96da33859603ff2e0605d4f94d7646cfee96cf030e2cb8304c0.zip
Role:
Fn::GetAtt:
- HelloHitCounterHitCounterHandlerServiceRoleD45002B8
- Arn
Environment:
Variables:
DOWNSTREAM_FUNCTION_NAME:
Ref: HelloHandler2E4FBA4D
HITS_TABLE_NAME:
Ref: HelloHitCounterHits7AAEBF80
Handler: hitcounter.handler
Runtime: nodejs14.x
DependsOn:
- HelloHitCounterHitCounterHandlerServiceRoleDefaultPolicy1487A60A
- HelloHitCounterHitCounterHandlerServiceRoleD45002B8
Metadata:
aws:cdk:path: CdkWorkshopStack/HelloHitCounter/HitCounterHandler/Resource
aws:asset:path: asset.89490e4a6ba8b96da33859603ff2e0605d4f94d7646cfee96cf030e2cb8304c0
aws:asset:is-bundled: false
aws:asset:property: Code
EndpointEEF1FD8F:
Type: AWS::ApiGateway::RestApi
Properties:
Name: Endpoint
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Resource
EndpointCloudWatchRoleC3C64E0F:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: apigateway.amazonaws.com
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/CloudWatchRole/Resource
EndpointAccountB8304247:
Type: AWS::ApiGateway::Account
Properties:
CloudWatchRoleArn:
Fn::GetAtt:
- EndpointCloudWatchRoleC3C64E0F
- Arn
DependsOn:
- EndpointEEF1FD8F
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Account
EndpointDeployment318525DA7a02bafcf1f33a692d15312adb602478:
Type: AWS::ApiGateway::Deployment
Properties:
RestApiId:
Ref: EndpointEEF1FD8F
Description: Automatically created by the RestApi construct
DependsOn:
- EndpointproxyANYC09721C5
- Endpointproxy39E2174E
- EndpointANY485C938B
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Deployment/Resource
EndpointDeploymentStageprodB78BEEA0:
Type: AWS::ApiGateway::Stage
Properties:
RestApiId:
Ref: EndpointEEF1FD8F
DeploymentId:
Ref: EndpointDeployment318525DA7a02bafcf1f33a692d15312adb602478
StageName: prod
DependsOn:
- EndpointAccountB8304247
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/DeploymentStage.prod/Resource
Endpointproxy39E2174E:
Type: AWS::ApiGateway::Resource
Properties:
ParentId:
Fn::GetAtt:
- EndpointEEF1FD8F
- RootResourceId
PathPart: "{proxy+}"
RestApiId:
Ref: EndpointEEF1FD8F
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/{proxy+}/Resource
EndpointproxyANYApiPermissionCdkWorkshopStackEndpoint018E8349ANYproxy747DCA52:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- HelloHitCounterHitCounterHandlerDAEA7B37
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: EndpointEEF1FD8F
- /
- Ref: EndpointDeploymentStageprodB78BEEA0
- /*/*
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/{proxy+}/ANY/ApiPermission.CdkWorkshopStackEndpoint018E8349.ANY..{proxy+}
EndpointproxyANYApiPermissionTestCdkWorkshopStackEndpoint018E8349ANYproxy41939001:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- HelloHitCounterHitCounterHandlerDAEA7B37
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: EndpointEEF1FD8F
- /test-invoke-stage/*/*
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/{proxy+}/ANY/ApiPermission.Test.CdkWorkshopStackEndpoint018E8349.ANY..{proxy+}
EndpointproxyANYC09721C5:
Type: AWS::ApiGateway::Method
Properties:
HttpMethod: ANY
ResourceId:
Ref: Endpointproxy39E2174E
RestApiId:
Ref: EndpointEEF1FD8F
AuthorizationType: NONE
Integration:
IntegrationHttpMethod: POST
Type: AWS_PROXY
Uri:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":apigateway:"
- Ref: AWS::Region
- :lambda:path/2015-03-31/functions/
- Fn::GetAtt:
- HelloHitCounterHitCounterHandlerDAEA7B37
- Arn
- /invocations
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/{proxy+}/ANY/Resource
EndpointANYApiPermissionCdkWorkshopStackEndpoint018E8349ANYE84BEB04:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- HelloHitCounterHitCounterHandlerDAEA7B37
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: EndpointEEF1FD8F
- /
- Ref: EndpointDeploymentStageprodB78BEEA0
- /*/
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/ANY/ApiPermission.CdkWorkshopStackEndpoint018E8349.ANY..
EndpointANYApiPermissionTestCdkWorkshopStackEndpoint018E8349ANYB6CC1B64:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- HelloHitCounterHitCounterHandlerDAEA7B37
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: EndpointEEF1FD8F
- /test-invoke-stage/*/
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/ANY/ApiPermission.Test.CdkWorkshopStackEndpoint018E8349.ANY..
EndpointANY485C938B:
Type: AWS::ApiGateway::Method
Properties:
HttpMethod: ANY
ResourceId:
Fn::GetAtt:
- EndpointEEF1FD8F
- RootResourceId
RestApiId:
Ref: EndpointEEF1FD8F
AuthorizationType: NONE
Integration:
IntegrationHttpMethod: POST
Type: AWS_PROXY
Uri:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":apigateway:"
- Ref: AWS::Region
- :lambda:path/2015-03-31/functions/
- Fn::GetAtt:
- HelloHitCounterHitCounterHandlerDAEA7B37
- Arn
- /invocations
Metadata:
aws:cdk:path: CdkWorkshopStack/Endpoint/Default/ANY/Resource
ViewHitCounterRenderedServiceRole254DB4EA:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: lambda.amazonaws.com
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/Rendered/ServiceRole/Resource
ViewHitCounterRenderedServiceRoleDefaultPolicy9ADB8C83:
Type: AWS::IAM::Policy
Properties:
PolicyDocument:
Statement:
- Action:
- dynamodb:BatchGetItem
- dynamodb:GetRecords
- dynamodb:GetShardIterator
- dynamodb:Query
- dynamodb:GetItem
- dynamodb:Scan
- dynamodb:ConditionCheckItem
Effect: Allow
Resource:
- Fn::GetAtt:
- HelloHitCounterHits7AAEBF80
- Arn
- Ref: AWS::NoValue
Version: "2012-10-17"
PolicyName: ViewHitCounterRenderedServiceRoleDefaultPolicy9ADB8C83
Roles:
- Ref: ViewHitCounterRenderedServiceRole254DB4EA
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/Rendered/ServiceRole/DefaultPolicy/Resource
ViewHitCounterRendered9C783E45:
Type: AWS::Lambda::Function
Properties:
Code:
S3Bucket:
Fn::Sub: cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}
S3Key: e2d9f4c587faa240510bb9cd1c0afe3112663d6336529432a852f5e452cf6456.zip
Role:
Fn::GetAtt:
- ViewHitCounterRenderedServiceRole254DB4EA
- Arn
Environment:
Variables:
TABLE_NAME:
Ref: HelloHitCounterHits7AAEBF80
TITLE: Hello Hits
SORT_BY: ""
Handler: index.handler
Runtime: nodejs12.x
DependsOn:
- ViewHitCounterRenderedServiceRoleDefaultPolicy9ADB8C83
- ViewHitCounterRenderedServiceRole254DB4EA
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/Rendered/Resource
aws:asset:path: asset.e2d9f4c587faa240510bb9cd1c0afe3112663d6336529432a852f5e452cf6456
aws:asset:is-bundled: false
aws:asset:property: Code
ViewHitCounterViewerEndpoint5A0EF326:
Type: AWS::ApiGateway::RestApi
Properties:
Name: ViewerEndpoint
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Resource
ViewHitCounterViewerEndpointCloudWatchRole87B94D6A:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: apigateway.amazonaws.com
Version: "2012-10-17"
ManagedPolicyArns:
- Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- :iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/CloudWatchRole/Resource
ViewHitCounterViewerEndpointAccount0B75E76A:
Type: AWS::ApiGateway::Account
Properties:
CloudWatchRoleArn:
Fn::GetAtt:
- ViewHitCounterViewerEndpointCloudWatchRole87B94D6A
- Arn
DependsOn:
- ViewHitCounterViewerEndpoint5A0EF326
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Account
ViewHitCounterViewerEndpointDeployment1CE7C57615fe4c294585f18a4ed474d2b246124b:
Type: AWS::ApiGateway::Deployment
Properties:
RestApiId:
Ref: ViewHitCounterViewerEndpoint5A0EF326
Description: Automatically created by the RestApi construct
DependsOn:
- ViewHitCounterViewerEndpointproxyANYFF4B8F5B
- ViewHitCounterViewerEndpointproxy2F4C239F
- ViewHitCounterViewerEndpointANY66F2285B
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Deployment/Resource
ViewHitCounterViewerEndpointDeploymentStageprodF3901FC7:
Type: AWS::ApiGateway::Stage
Properties:
RestApiId:
Ref: ViewHitCounterViewerEndpoint5A0EF326
DeploymentId:
Ref: ViewHitCounterViewerEndpointDeployment1CE7C57615fe4c294585f18a4ed474d2b246124b
StageName: prod
DependsOn:
- ViewHitCounterViewerEndpointAccount0B75E76A
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/DeploymentStage.prod/Resource
ViewHitCounterViewerEndpointproxy2F4C239F:
Type: AWS::ApiGateway::Resource
Properties:
ParentId:
Fn::GetAtt:
- ViewHitCounterViewerEndpoint5A0EF326
- RootResourceId
PathPart: "{proxy+}"
RestApiId:
Ref: ViewHitCounterViewerEndpoint5A0EF326
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/{proxy+}/Resource
ViewHitCounterViewerEndpointproxyANYApiPermissionCdkWorkshopStackViewHitCounterViewerEndpointA52B16FFANYproxy252C605A:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- ViewHitCounterRendered9C783E45
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: ViewHitCounterViewerEndpoint5A0EF326
- /
- Ref: ViewHitCounterViewerEndpointDeploymentStageprodF3901FC7
- /*/*
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/{proxy+}/ANY/ApiPermission.CdkWorkshopStackViewHitCounterViewerEndpointA52B16FF.ANY..{proxy+}
ViewHitCounterViewerEndpointproxyANYApiPermissionTestCdkWorkshopStackViewHitCounterViewerEndpointA52B16FFANYproxy1404CEF4:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- ViewHitCounterRendered9C783E45
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: ViewHitCounterViewerEndpoint5A0EF326
- /test-invoke-stage/*/*
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/{proxy+}/ANY/ApiPermission.Test.CdkWorkshopStackViewHitCounterViewerEndpointA52B16FF.ANY..{proxy+}
ViewHitCounterViewerEndpointproxyANYFF4B8F5B:
Type: AWS::ApiGateway::Method
Properties:
HttpMethod: ANY
ResourceId:
Ref: ViewHitCounterViewerEndpointproxy2F4C239F
RestApiId:
Ref: ViewHitCounterViewerEndpoint5A0EF326
AuthorizationType: NONE
Integration:
IntegrationHttpMethod: POST
Type: AWS_PROXY
Uri:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":apigateway:"
- Ref: AWS::Region
- :lambda:path/2015-03-31/functions/
- Fn::GetAtt:
- ViewHitCounterRendered9C783E45
- Arn
- /invocations
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/{proxy+}/ANY/Resource
ViewHitCounterViewerEndpointANYApiPermissionCdkWorkshopStackViewHitCounterViewerEndpointA52B16FFANY00F849F4:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- ViewHitCounterRendered9C783E45
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: ViewHitCounterViewerEndpoint5A0EF326
- /
- Ref: ViewHitCounterViewerEndpointDeploymentStageprodF3901FC7
- /*/
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/ANY/ApiPermission.CdkWorkshopStackViewHitCounterViewerEndpointA52B16FF.ANY..
ViewHitCounterViewerEndpointANYApiPermissionTestCdkWorkshopStackViewHitCounterViewerEndpointA52B16FFANY9EC7D814:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- ViewHitCounterRendered9C783E45
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":execute-api:"
- Ref: AWS::Region
- ":"
- Ref: AWS::AccountId
- ":"
- Ref: ViewHitCounterViewerEndpoint5A0EF326
- /test-invoke-stage/*/
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/ANY/ApiPermission.Test.CdkWorkshopStackViewHitCounterViewerEndpointA52B16FF.ANY..
ViewHitCounterViewerEndpointANY66F2285B:
Type: AWS::ApiGateway::Method
Properties:
HttpMethod: ANY
ResourceId:
Fn::GetAtt:
- ViewHitCounterViewerEndpoint5A0EF326
- RootResourceId
RestApiId:
Ref: ViewHitCounterViewerEndpoint5A0EF326
AuthorizationType: NONE
Integration:
IntegrationHttpMethod: POST
Type: AWS_PROXY
Uri:
Fn::Join:
- ""
- - "arn:"
- Ref: AWS::Partition
- ":apigateway:"
- Ref: AWS::Region
- :lambda:path/2015-03-31/functions/
- Fn::GetAtt:
- ViewHitCounterRendered9C783E45
- Arn
- /invocations
Metadata:
aws:cdk:path: CdkWorkshopStack/ViewHitCounter/ViewerEndpoint/Default/ANY/Resource
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Analytics: v2:deflate64:H4sIAAAAAAAA/1WQQU+EMBCFf8vey7io8c6u8aSRoPfN0I7sLLQltHUlhP9uKRrxNN+8dt689hbyPex3eHWZVG3WcQ3Tm0fZiiidpg51rRCmp2CkZ2vE8cNsuaRBs3OxmwWjhqmyHS0HqZa2Yzmme4lm4e5O6Bx5B8VSYg+HIFvyB3Qk1GhQWxUjvGO9+iSYBfbcoKcrjjA9p0wVOV/0nHb9YSGlDcaLR+o7O2qKGNVNF9/WJOMV4qgNg6S0vhzs1/ir/Biv/EL+bNUirTTPIuVfTNg0Yjv0Gnwf/L/xyEdrFPv0T8Yqgou7+czvIX+AfHdxzNkQY7MmqNb6DRbRSiCYAQAA
Metadata:
aws:cdk:path: CdkWorkshopStack/CDKMetadata/Default
Condition: CDKMetadataAvailable
Outputs:
Endpoint8024A810:
Value:
Fn::Join:
- ""
- - https://
- Ref: EndpointEEF1FD8F
- .execute-api.
- Ref: AWS::Region
- "."
- Ref: AWS::URLSuffix
- /
- Ref: EndpointDeploymentStageprodB78BEEA0
- /
ViewHitCounterViewerEndpointCA1B1E4B:
Value:
Fn::Join:
- ""
- - https://
- Ref: ViewHitCounterViewerEndpoint5A0EF326
- .execute-api.
- Ref: AWS::Region
- "."
- Ref: AWS::URLSuffix
- /
- Ref: ViewHitCounterViewerEndpointDeploymentStageprodF3901FC7
- /
Conditions:
CDKMetadataAvailable:
Fn::Or:
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- af-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-east-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-2
- Fn::Equals:
- Ref: AWS::Region
- ap-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-2
- Fn::Equals:
- Ref: AWS::Region
- ca-central-1
- Fn::Equals:
- Ref: AWS::Region
- cn-north-1
- Fn::Equals:
- Ref: AWS::Region
- cn-northwest-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- eu-central-1
- Fn::Equals:
- Ref: AWS::Region
- eu-north-1
- Fn::Equals:
- Ref: AWS::Region
- eu-south-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-2
- Fn::Equals:
- Ref: AWS::Region
- eu-west-3
- Fn::Equals:
- Ref: AWS::Region
- me-south-1
- Fn::Equals:
- Ref: AWS::Region
- sa-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-2
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- us-west-1
- Fn::Equals:
- Ref: AWS::Region
- us-west-2
Parameters:
BootstrapVersion:
Type: AWS::SSM::Parameter::Value<String>
Default: /cdk-bootstrap/hnb659fds/version
Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]
Rules:
CheckBootstrapVersion:
Assertions:
- Assert:
Fn::Not:
- Fn::Contains:
- - "1"
- "2"
- "3"
- "4"
- "5"
- Ref: BootstrapVersion
AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.