-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInfrastructure.yml
2424 lines (2417 loc) · 70.5 KB
/
Infrastructure.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
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
AWSTemplateFormatVersion: 2010-09-09
Description: 'Serverless CloudFormation Script has provision to create 15 Lambdas, 1 ApiGateway,2 S3 buckets,3 Step function,2 SQS, 10 Dynamo tables,1 Redis cache, 1 Kinesis Stream'
Metadata:
'AWS::CloudFormation::Interface':
ParameterGroups:
- Label:
default: Common Parameters
Parameters:
- System
- SubSystem
- RevenueStream
- KMSArn
- Bucket1Name
- Bucket2Name
- FriendlyDomainName
- Label:
default: Lambda Parameters
Parameters:
- FunctionName1
- FunctionName2
- FunctionName3
- FunctionName4
- FunctionName5
- FunctionName6
- FunctionName7
- FunctionName8
- FunctionName9
- FunctionName10
- FunctionName11
- FunctionName12
- FunctionName13
- FunctionName14
- FunctionName15
- Label:
default: StepFunction Parameters
Parameters:
- StepFunctionName1
- StepFunctionName2
- StepFunctionName3
-
Label:
default: "Queue Parameters"
Parameters:
- QueueName1
- FifoQueue1
- QueueName2
- FifoQueue2
- Label:
default: Kinesis Parameters
Parameters:
- KNS1StreamName
- Label:
default: Dynamo Parameters
Parameters:
- TableName1
- T1PartitionKeyName
- T1PartitionKeyType
- T1SortKeyName
- T1SortKeyType
- TableName2
- T2PartitionKeyName
- T2PartitionKeyType
- T2SortKeyName
- T2SortKeyType
- TableName3
- T3PartitionKeyName
- T3PartitionKeyType
- T3SortKeyName
- T3SortKeyType
- TableName4
- T4PartitionKeyName
- T4PartitionKeyType
- T4SortKeyName
- T4SortKeyType
- TableName5
- T5PartitionKeyName
- T5PartitionKeyType
- T5SortKeyName
- T5SortKeyType
- TableName6
- T6PartitionKeyName
- T6SortKeyName
- TableName7
- T7PartitionKeyName
- T7SortKeyName
- TableName8
- T8PartitionKeyName
- T8SortKeyName
- TableName9
- T9PartitionKeyName
- T9SortKeyName
- TableName10
- T10PartitionKeyName
- T10SortKeyName
- Label:
default: Redis Cache Parameters
Parameters:
- AuthToken
ParameterLabels:
System:
default: System
SubSystem:
default: SubSystem
RevenueStream:
default: Revenue Stream
FriendlyDomainName:
default: User-friendly api domain
Bucket1Name:
default: Bucket-1 Name
Bucket2Name:
default: Bucket-2 Name
FunctionName1:
default: Lambda-1 Name
FunctionName2:
default: Lambda-2 Name
FunctionName3:
default: Lambda-3 Name
FunctionName4:
default: Lambda-4 Name
FunctionName5:
default: Lambda-5 Name
FunctionName6:
default: Lambda-6 Name
FunctionName7:
default: Lambda-7 Name
FunctionName8:
default: Lambda-8 Name
FunctionName9:
default: Lambda-9 Name
FunctionName10:
default: Lambda-10 Name
FunctionName11:
default: Lambda-11 Name
FunctionName12:
default: Lambda-12 Name
FunctionName13:
default: Lambda-13 Name
FunctionName14:
default: Lambda-14 Name
StepFunctionName1:
default: StepFunction Name
StepFunctionName2:
default: StepFunction Name
StepFunctionName3:
default: StepFunction Name
TableName1:
default: DynamoDB-1 Name
T1PartitionKeyName:
default: PartitionKey-1 Name
T1PartitionKeyType:
default: PartitionKey-1 Type
T1SortKeyName:
default: SortKey-1 Name
T1SortKeyType:
default: SortKey-1 Type
TableName2:
default: DynamoDB-2 Name
T2PartitionKeyName:
default: PartitionKey-2 Name
T2PartitionKeyType:
default: PartitionKey-2 Type
T2SortKeyName:
default: SortKey-2 Name
T2SortKeyType:
default: SortKey-2 Type
TableName3:
default: DynamoDB-3 Name
T3PartitionKeyName:
default: PartitionKey-3 Name
T3PartitionKeyType:
default: PartitionKey-3 Type
T3SortKeyName:
default: SortKey-3 Name
T3SortKeyType:
default: SortKey-3 Type
TableName4:
default: DynamoDB-4 Name
T4PartitionKeyName:
default: PartitionKey-4 Name
T4PartitionKeyType:
default: PartitionKey-4 Type
T4SortKeyName:
default: SortKey-4 Name
T4SortKeyType:
default: SortKey-4 Type
TableName5:
default: DynamoDB-5 Name
T5PartitionKeyName:
default: PartitionKey-5 Name
T5PartitionKeyType:
default: PartitionKey-5 Type
T5SortKeyName:
default: SortKey-5 Name
T5SortKeyType:
default: SortKey-5 Type
TableName6:
default: DynamoDB-6 Name
T6PartitionKeyName:
default: PartitionKey-6 Name
T6SortKeyName:
default: SortKey-6 Name
TableName7:
default: DynamoDB-7 Name
T7PartitionKeyName:
default: PartitionKey-7 Name
T7SortKeyName:
default: SortKey-7 Name
TableName8:
default: DynamoDB-8 Name
T8PartitionKeyName:
default: PartitionKey-8 Name
T8SortKeyName:
default: SortKey-8 Name
TableName9:
default: DynamoDB-9 Name
T9PartitionKeyName:
default: PartitionKey-9 Name
T9SortKeyName:
default: SortKey-9 Name
TableName10:
default: DynamoDB-10 Name
T10PartitionKeyName:
default: PartitionKey-10 Name
T10SortKeyName:
default: SortKey-10 Name
QueueName1:
default: "Queue-1 Name"
QueueName2:
default: "Queue-2 Name"
AuthToken :
default: "Redis Cache AuthToken"
KNS1StreamName:
default: Kinesis Stream Name
KMSArn:
default: KMS ARN
Mappings:
SystemMapping:
SampleSystem:
IntSubnets:
- subnet-90705ccd
- subnet-14fff670
- subnet-c9250be6
VpcId: vpc-7c368507
Parameters:
System:
Type: String
Default: ''
Description: Enter System Name
SubSystem:
Type: String
Default: ''
Description: Enter SubSystem Name
RevenueStream:
Type: String
Default: ''
Description: Enter Revenue Stream Name
FunctionName1:
Type: String
Default: ''
Description: Enter 1st Lambda Function Name(Do not append System & Sub-System Name).
FunctionName2:
Type: String
Default: ''
Description: Enter 2nd Lambda Function Name(Do not append System & Sub-System Name).
FunctionName3:
Type: String
Default: ''
Description: Enter 3rd Lambda Function Name(Do not append System & Sub-System Name).
FunctionName4:
Type: String
Default: ''
Description: Enter 4th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName5:
Type: String
Default: ''
Description: Enter 5th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName6:
Type: String
Default: ''
Description: Enter 6th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName7:
Type: String
Default: ''
Description: Enter 7th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName8:
Type: String
Default: ''
Description: Enter 8th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName9:
Type: String
Default: ''
Description: Enter 9th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName10:
Type: String
Default: ''
Description: Enter 10th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName11:
Type: String
Default: ''
Description: Enter 11th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName12:
Type: String
Default: ''
Description: Enter 12th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName13:
Type: String
Default: ''
Description: Enter 13th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName14:
Type: String
Default: ''
Description: Enter 14th Lambda Function Name(Do not append System & Sub-System Name).
FunctionName15:
Type: String
Default: ''
Description: Enter 15th Lambda Function Name(Do not append System & Sub-System Name).
StepFunctionName1:
Description: Enter StepFunction Name(Do not append System & Sub-System Name).
Type: String
Default: ''
StepFunctionName2:
Description: Enter StepFunction Name(Do not append System & Sub-System Name).
Type: String
Default: ''
StepFunctionName3:
Description: Enter StepFunction Name(Do not append System & Sub-System Name).
Type: String
Default: ''
QueueName1:
Description: 'Enter 1st Queue Name(Do not append System & Sub-System Name).'
Type: String
Default: ''
FifoQueue1:
Type: String
Default: false
AllowedValues:
- false
- true
QueueName2:
Description: 'Enter 2nd Queue Name(Do not append System & Sub-System Name).'
Type: String
Default: ''
FifoQueue2:
Type: String
Default: false
AllowedValues:
- false
- true
TableName1:
Description: Enter 1st Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T1PartitionKeyName:
Description: Enter 1st Dynamo Table Partition Key.
Type: String
T1PartitionKeyType:
Description: Enter 1st Dynamo Table Partition Key Type.
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
T1SortKeyName:
Description: Optional - Enter 1st Dynamo Table Sort Key.
Type: String
Default: ''
T1SortKeyType:
Description: Type of the sort key (if SortKey-1 Name is set).
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
TableName2:
Description: Enter 2nd Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T2PartitionKeyName:
Description: Enter 2nd Dynamo Table Partition Key.
Type: String
T2PartitionKeyType:
Description: Enter 2nd Dynamo Table Partition Key Type.
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
T2SortKeyName:
Description: Optional - Enter 2nd Dynamo Table Sort Key.
Type: String
Default: ''
T2SortKeyType:
Description: Type of the sort key (if SortKey-2 Name is set).
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
TableName3:
Description: Enter 3rd Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T3PartitionKeyName:
Description: Enter 3rd Dynamo Table Partition Key.
Type: String
T3PartitionKeyType:
Description: Enter 3rd Dynamo Table Partition Key Type.
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
T3SortKeyName:
Description: Optional - Enter 3rd Dynamo Table Sort Key.
Type: String
Default: ''
T3SortKeyType:
Description: Type of the sort key (if SortKey-3 Name is set).
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
TableName4:
Description: Enter 4th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T4PartitionKeyName:
Description: Enter 4th Dynamo Table Partition Key.
Type: String
T4PartitionKeyType:
Description: Enter 4th Dynamo Table Partition Key Type.
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
T4SortKeyName:
Description: Optional - Enter 4th Dynamo Table Sort Key.
Type: String
Default: ''
T4SortKeyType:
Description: Type of the sort key (if SortKey-4 Name is set).
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
TableName5:
Description: Enter 5th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T5PartitionKeyName:
Description: Enter 5th Dynamo Table Partition Key.
Type: String
T5PartitionKeyType:
Description: Enter 5th Dynamo Table Partition Key Type.
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
T5SortKeyName:
Description: Optional - Enter 5th Dynamo Table Sort Key.
Type: String
Default: ''
T5SortKeyType:
Description: Type of the sort key (if SortKey-5 Name is set).
Type: String
Default: S
AllowedValues:
- S
- 'N'
- B
TableName6:
Description: Enter 6th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T6PartitionKeyName:
Description: Enter 6th Dynamo Table Partition Key.
Type: String
Default: ''
T6SortKeyName:
Description: Optional - Enter 6th Dynamo Table Sort Key.
Type: String
Default: ''
TableName7:
Description: Enter 7th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T7PartitionKeyName:
Description: Enter 7th Dynamo Table Partition Key.
Type: String
Default: ''
T7SortKeyName:
Description: Optional - Enter 7th Dynamo Table Sort Key.
Type: String
Default: ''
TableName8:
Description: Enter 8th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T8PartitionKeyName:
Description: Enter 8th Dynamo Table Partition Key.
Type: String
Default: ''
T8SortKeyName:
Description: Optional - Enter 8th Dynamo Table Sort Key.
Type: String
Default: ''
TableName9:
Description: Enter 9th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T9PartitionKeyName:
Description: Enter 9th Dynamo Table Partition Key.
Type: String
Default: ''
T9SortKeyName:
Description: Optional - Enter 9th Dynamo Table Sort Key.
Type: String
Default: ''
TableName10:
Description: Enter 10th Dynamo Table Name(Do not append System & Sub-System Name).
Type: String
Default: ''
T10PartitionKeyName:
Description: Enter 10th Dynamo Table Partition Key.
Type: String
Default: ''
T10SortKeyName:
Description: Optional - Enter 10th Dynamo Table Sort Key.
Type: String
Default: ''
LambdaRuntime:
Type: String
Default: nodejs14.x
Bucket1Name:
Type: String
Default: ''
Description: Enter Bucket-1 Name(Do not append crx-dev).
Bucket2Name:
Type: String
Default: ''
Description: Enter Bucket-2 Name(Do not append crx-dev).
FriendlyDomainName:
Type: String
Default: ''
Description: Enter user friendly domain that will be used for API-Gateway.
KNS1StreamName:
Type: String
Default: ''
Description: Enter the Kinesis Stream Name
KMSArn:
Type: String
Description: Enter KMS ARN based on your subsystem.
Default: ''
AuthToken:
Description: >-
Password (16 to 128 characters) used to authenticate against Redis.
Requried when TransitEncryption = true. Leave blank to disable
password-protection.
Type: String
Default: ''
MaxLength: 128
HostedZoneName:
Description: The route53 HostedZoneName. For example, "mydomain.com." Don't forget the period at the end.
Type: String
Default: 'mydomain.com.'
Conditions:
HasSortKey1: !Not
- !Equals
- !Ref T1SortKeyName
- ''
HasSortKey2: !Not
- !Equals
- !Ref T2SortKeyName
- ''
HasSortKey3: !Not
- !Equals
- !Ref T3SortKeyName
- ''
HasSortKey4: !Not
- !Equals
- !Ref T4SortKeyName
- ''
HasSortKey5: !Not
- !Equals
- !Ref T5SortKeyName
- ''
HasSortKey6: !Not
- !Equals
- !Ref T6SortKeyName
- ''
HasSortKey7: !Not
- !Equals
- !Ref T7SortKeyName
- ''
HasSortKey8: !Not
- !Equals
- !Ref T8SortKeyName
- ''
HasSortKey9: !Not
- !Equals
- !Ref T9SortKeyName
- ''
HasSortKey10: !Not
- !Equals
- !Ref T10SortKeyName
- ''
HasTableName1: !Not
- !Equals
- !Ref TableName1
- ''
HasTableName2: !Not
- !Equals
- !Ref TableName2
- ''
HasTableName3: !Not
- !Equals
- !Ref TableName3
- ''
HasTableName4: !Not
- !Equals
- !Ref TableName4
- ''
HasTableName5: !Not
- !Equals
- !Ref TableName5
- ''
HasTableName6: !Not
- !Equals
- !Ref TableName6
- ''
HasTableName7: !Not
- !Equals
- !Ref TableName7
- ''
HasTableName8: !Not
- !Equals
- !Ref TableName8
- ''
HasTableName9: !Not
- !Equals
- !Ref TableName9
- ''
HasTableName10: !Not
- !Equals
- !Ref TableName10
- ''
HasFunctionName1: !Not
- !Equals
- !Ref FunctionName1
- ''
HasFunctionName2: !Not
- !Equals
- !Ref FunctionName2
- ''
HasFunctionName3: !Not
- !Equals
- !Ref FunctionName3
- ''
HasFunctionName4: !Not
- !Equals
- !Ref FunctionName4
- ''
HasFunctionName5: !Not
- !Equals
- !Ref FunctionName5
- ''
HasFunctionName6: !Not
- !Equals
- !Ref FunctionName6
- ''
HasFunctionName7: !Not
- !Equals
- !Ref FunctionName7
- ''
HasFunctionName8: !Not
- !Equals
- !Ref FunctionName8
- ''
HasFunctionName9: !Not
- !Equals
- !Ref FunctionName9
- ''
HasFunctionName10: !Not
- !Equals
- !Ref FunctionName10
- ''
HasFunctionName11: !Not
- !Equals
- !Ref FunctionName11
- ''
HasFunctionName12: !Not
- !Equals
- !Ref FunctionName12
- ''
HasFunctionName13: !Not
- !Equals
- !Ref FunctionName13
- ''
HasFunctionName14: !Not
- !Equals
- !Ref FunctionName14
- ''
HasFunctionName15: !Not
- !Equals
- !Ref FunctionName15
- ''
HasStepFunctionName1: !Not
- !Equals
- !Ref StepFunctionName1
- ''
HasStepFunctionName2: !Not
- !Equals
- !Ref StepFunctionName2
- ''
HasStepFunctionName3: !Not
- !Equals
- !Ref StepFunctionName3
- ''
HasBucket1Name: !Not
- !Equals
- !Ref Bucket1Name
- ''
HasBucket2Name: !Not
- !Equals
- !Ref Bucket2Name
- ''
HasQueueName1: !Not [!Equals [!Ref QueueName1, '']]
IsFifoQueue1: !Equals
- !Ref FifoQueue1
- true
HasQueueName2: !Not [!Equals [!Ref QueueName2, '']]
IsFifoQueue2: !Equals
- !Ref FifoQueue2
- true
HasRedisAuthToken: !Not
- !Equals
- !Ref AuthToken
- ''
HasUserFriendlyName: !And
- !Not [!Equals [!Ref FriendlyDomainName, '']]
- !Not [!Equals [!Ref FunctionName1, '']]
HasKNS1: !Not
- !Equals
- !Ref KNS1StreamName
- ''
Resources:
StepFunction1:
Type: 'AWS::StepFunctions::StateMachine'
Condition: HasStepFunctionName1
Properties:
StateMachineName: !Sub '${System}-${SubSystem}-${StepFunctionName1}'
DefinitionString: !Sub |
{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Pass",
"Result": "Hello World!",
"End": true
}
}
}
RoleArn: !GetAtt
- LambdaExecutionRole
- Arn
Tags:
- Value: !Sub '${System}-${SubSystem}-${StepFunctionName1}'
Key: Name
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Value: !Ref RevenueStream
Key: RevenueStream
- Value: Development
Key: Environment
StepFunction2:
Type: 'AWS::StepFunctions::StateMachine'
Condition: HasStepFunctionName2
Properties:
StateMachineName: !Sub '${System}-${SubSystem}-${StepFunctionName2}'
DefinitionString: !Sub |
{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Pass",
"Result": "Hello World!",
"End": true
}
}
}
RoleArn: !GetAtt
- LambdaExecutionRole
- Arn
Tags:
- Value: !Sub '${System}-${SubSystem}-${StepFunctionName2}'
Key: Name
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Value: !Ref RevenueStream
Key: RevenueStream
- Value: Development
Key: Environment
StepFunction3:
Type: 'AWS::StepFunctions::StateMachine'
Condition: HasStepFunctionName3
Properties:
StateMachineName: !Sub '${System}-${SubSystem}-${StepFunctionName3}'
DefinitionString: !Sub |
{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Pass",
"Result": "Hello World!",
"End": true
}
}
}
RoleArn: !GetAtt
- LambdaExecutionRole
- Arn
Tags:
- Value: !Sub '${System}-${SubSystem}-${StepFunctionName3}'
Key: Name
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Value: !Ref RevenueStream
Key: RevenueStream
- Value: Development
Key: Environment
Queue1:
Type: 'AWS::SQS::Queue'
Condition : HasQueueName1
Properties:
QueueName: !If
- IsFifoQueue1
- !Sub '${System}-${SubSystem}-${QueueName1}.fifo'
- !Sub '${System}-${SubSystem}-${QueueName1}'
DelaySeconds: 0
MaximumMessageSize: 262144
MessageRetentionPeriod: 1209600
ReceiveMessageWaitTimeSeconds: 0
KmsDataKeyReusePeriodSeconds: 86400
VisibilityTimeout: 30
FifoQueue: !If
- IsFifoQueue1
- true
- !Ref AWS::NoValue
KmsMasterKeyId: !Ref KMSArn
Tags:
- Value: !Sub '${System}-${SubSystem}-${QueueName1}'
Key: Name
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Value: !Ref RevenueStream
Key: RevenueStream
- Value: Development
Key: Environment
Queue2:
Type: 'AWS::SQS::Queue'
Condition : HasQueueName2
Properties:
QueueName: !If
- IsFifoQueue2
- !Sub '${System}-${SubSystem}-${QueueName2}.fifo'
- !Sub '${System}-${SubSystem}-${QueueName2}'
DelaySeconds: 0
MaximumMessageSize: 262144
MessageRetentionPeriod: 1209600
ReceiveMessageWaitTimeSeconds: 0
KmsDataKeyReusePeriodSeconds: 86400
VisibilityTimeout: 30
FifoQueue: !If
- IsFifoQueue2
- true
- !Ref AWS::NoValue
KmsMasterKeyId: !Ref KMSArn
Tags:
- Value: !Sub '${System}-${SubSystem}-${QueueName2}'
Key: Name
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Value: !Ref RevenueStream
Key: RevenueStream
- Value: Development
Key: Environment
Bucket1:
Type: 'AWS::S3::Bucket'
Condition: HasBucket1Name
Properties:
BucketName: !Sub 'tezs-dev-${Bucket1Name}'
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: 'aws:kms'
KMSMasterKeyID: !Ref KMSArn
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true
Tags:
- Key: Environment
Value: Development
- Key: RevenueStream
Value: !Ref RevenueStream
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Key: Name
Value: !Sub 'tezs-dev-${Bucket1Name}'
Bucket2:
Type: 'AWS::S3::Bucket'
Condition: HasBucket2Name
Properties:
BucketName: !Sub 'tezs-dev-${Bucket2Name}'
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: 'aws:kms'
KMSMasterKeyID: !Ref KMSArn
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true
Tags:
- Key: Environment
Value: Development
- Key: RevenueStream
Value: !Ref RevenueStream
- Key: SubSystem
Value: !Ref SubSystem
- Key: System
Value: !Ref System
- Key: Name
Value: !Sub 'tezs-dev-${Bucket2Name}'
DynamoDB1:
Type: 'AWS::DynamoDB::Table'
Condition: HasTableName1
Properties:
TableName: !Sub '${System}-${SubSystem}-${TableName1}'
AttributeDefinitions: !If
- HasSortKey1
- - AttributeName: !Ref T1PartitionKeyName
AttributeType: !Ref T1PartitionKeyType
- AttributeName: !Ref T1SortKeyName
AttributeType: !Ref T1SortKeyType
- - AttributeName: !Ref T1PartitionKeyName
AttributeType: !Ref T1PartitionKeyType
BillingMode: PAY_PER_REQUEST
KeySchema: !If
- HasSortKey1
- - AttributeName: !Ref T1PartitionKeyName
KeyType: HASH
- AttributeName: !Ref T1SortKeyName
KeyType: RANGE
- - AttributeName: !Ref T1PartitionKeyName
KeyType: HASH
Tags:
- Value: !Sub '${System}-${SubSystem}-${TableName1}'
Key: Name
- Value: !Ref System
Key: System
- Value: !Ref SubSystem
Key: SubSystem
- Value: !Ref RevenueStream
Key: RevenueStream
- Value: Development
Key: Environment
- Value: Daily-Backup
Key: No
DynamoDB2:
Type: 'AWS::DynamoDB::Table'