1
1
{
2
2
"Description" : " Integration Test for sample application that uses aws-kineisstream-glue-job construct" ,
3
- "Parameters" : {
4
- "AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3Bucket96760533" : {
5
- "Type" : " String" ,
6
- "Description" : " S3 bucket for asset \" d4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4\" "
7
- },
8
- "AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9" : {
9
- "Type" : " String" ,
10
- "Description" : " S3 key for asset version \" d4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4\" "
11
- },
12
- "AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4ArtifactHashC026BAAB" : {
13
- "Type" : " String" ,
14
- "Description" : " Artifact hash for asset \" d4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4\" "
15
- }
16
- },
17
3
"Resources" : {
18
4
"CustomETLKinesisStreamB4F1869F" : {
19
5
"Type" : " AWS::Kinesis::Stream" ,
20
6
"Properties" : {
21
- "ShardCount" : 1 ,
22
7
"RetentionPeriodHours" : 24 ,
8
+ "ShardCount" : 1 ,
23
9
"StreamEncryption" : {
24
10
"EncryptionType" : " KMS" ,
25
11
"KeyId" : " alias/aws/kinesis"
12
+ },
13
+ "StreamModeDetails" : {
14
+ "StreamMode" : " PROVISIONED"
26
15
}
27
16
}
28
17
},
135
124
" s3:GetBucket*" ,
136
125
" s3:List*" ,
137
126
" s3:DeleteObject*" ,
138
- " s3:PutObject*" ,
127
+ " s3:PutObject" ,
128
+ " s3:PutObjectLegalHold" ,
129
+ " s3:PutObjectRetention" ,
130
+ " s3:PutObjectTagging" ,
131
+ " s3:PutObjectVersionTagging" ,
139
132
" s3:Abort*"
140
133
],
141
134
"Effect" : " Allow" ,
180
173
},
181
174
" :s3:::" ,
182
175
{
183
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3Bucket96760533"
184
- },
185
- " /" ,
186
- {
187
- "Fn::Select" : [
188
- 0 ,
189
- {
190
- "Fn::Split" : [
191
- " ||" ,
192
- {
193
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9"
194
- }
195
- ]
196
- }
197
- ]
198
- },
199
- {
200
- "Fn::Select" : [
201
- 1 ,
202
- {
203
- "Fn::Split" : [
204
- " ||" ,
205
- {
206
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9"
207
- }
208
- ]
209
- }
210
- ]
176
+ "Fn::Sub" : " cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
211
177
}
212
178
]
213
179
]
222
188
},
223
189
" :s3:::" ,
224
190
{
225
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3Bucket96760533"
226
- },
227
- " /" ,
228
- {
229
- "Fn::Select" : [
230
- 0 ,
231
- {
232
- "Fn::Split" : [
233
- " ||" ,
234
- {
235
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9"
236
- }
237
- ]
238
- }
239
- ]
240
- },
241
- {
242
- "Fn::Select" : [
243
- 1 ,
244
- {
245
- "Fn::Split" : [
246
- " ||" ,
247
- {
248
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9"
249
- }
250
- ]
251
- }
252
- ]
191
+ "Fn::Sub" : " cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
253
192
},
254
193
" /*"
255
194
]
286
225
"BlockPublicPolicy" : true ,
287
226
"IgnorePublicAcls" : true ,
288
227
"RestrictPublicBuckets" : true
228
+ },
229
+ "VersioningConfiguration" : {
230
+ "Status" : " Enabled"
289
231
}
290
232
},
291
233
"UpdateReplacePolicy" : " Retain" ,
310
252
"PolicyDocument" : {
311
253
"Statement" : [
312
254
{
313
- "Action" : " *" ,
255
+ "Action" : " s3: *" ,
314
256
"Condition" : {
315
257
"Bool" : {
316
258
"aws:SecureTransport" : " false"
320
262
"Principal" : {
321
263
"AWS" : " *"
322
264
},
323
- "Resource" : {
324
- "Fn::Join" : [
325
- " " ,
326
- [
327
- {
328
- "Fn::GetAtt" : [
329
- " CustomETLS3LoggingBucketBBDD45CB" ,
330
- " Arn"
331
- ]
332
- },
333
- " /*"
265
+ "Resource" : [
266
+ {
267
+ "Fn::GetAtt" : [
268
+ " CustomETLS3LoggingBucketBBDD45CB" ,
269
+ " Arn"
334
270
]
335
- ]
336
- },
337
- "Sid" : " HttpsOnly"
271
+ },
272
+ {
273
+ "Fn::Join" : [
274
+ " " ,
275
+ [
276
+ {
277
+ "Fn::GetAtt" : [
278
+ " CustomETLS3LoggingBucketBBDD45CB" ,
279
+ " Arn"
280
+ ]
281
+ },
282
+ " /*"
283
+ ]
284
+ ]
285
+ }
286
+ ]
338
287
}
339
288
],
340
289
"Version" : " 2012-10-17"
393
342
"PolicyDocument" : {
394
343
"Statement" : [
395
344
{
396
- "Action" : " *" ,
345
+ "Action" : " s3: *" ,
397
346
"Condition" : {
398
347
"Bool" : {
399
348
"aws:SecureTransport" : " false"
403
352
"Principal" : {
404
353
"AWS" : " *"
405
354
},
406
- "Resource" : {
407
- "Fn::Join" : [
408
- " " ,
409
- [
410
- {
411
- "Fn::GetAtt" : [
412
- " CustomETLS3Bucket3EE58725" ,
413
- " Arn"
414
- ]
415
- },
416
- " /*"
355
+ "Resource" : [
356
+ {
357
+ "Fn::GetAtt" : [
358
+ " CustomETLS3Bucket3EE58725" ,
359
+ " Arn"
417
360
]
418
- ]
419
- },
420
- "Sid" : " HttpsOnly"
361
+ },
362
+ {
363
+ "Fn::Join" : [
364
+ " " ,
365
+ [
366
+ {
367
+ "Fn::GetAtt" : [
368
+ " CustomETLS3Bucket3EE58725" ,
369
+ " Arn"
370
+ ]
371
+ },
372
+ " /*"
373
+ ]
374
+ ]
375
+ }
376
+ ]
421
377
}
422
378
],
423
379
"Version" : " 2012-10-17"
431
387
"Name" : " gluestreaming" ,
432
388
"PythonVersion" : " 3" ,
433
389
"ScriptLocation" : {
434
- "Fn::Join" : [
435
- " " ,
436
- [
437
- " s3://" ,
438
- {
439
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3Bucket96760533"
440
- },
441
- " /" ,
442
- {
443
- "Fn::Select" : [
444
- 0 ,
445
- {
446
- "Fn::Split" : [
447
- " ||" ,
448
- {
449
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9"
450
- }
451
- ]
452
- }
453
- ]
454
- },
455
- {
456
- "Fn::Select" : [
457
- 1 ,
458
- {
459
- "Fn::Split" : [
460
- " ||" ,
461
- {
462
- "Ref" : " AssetParametersd4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4S3VersionKey856519B9"
463
- }
464
- ]
465
- }
466
- ]
467
- }
468
- ]
469
- ]
390
+ "Fn::Sub" : " s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d4dd6643ee852c9578ae2d36cf2dc8a48630fd2219a15e74502c7ea75bff70c4.py"
470
391
}
471
392
},
472
393
"Role" : {
488
409
"Fn::Join" : [
489
410
" " ,
490
411
[
491
- " s3 ://" ,
412
+ " s3a ://" ,
492
413
{
493
414
"Ref" : " CustomETLS3Bucket3EE58725"
494
415
},
498
419
}
499
420
},
500
421
"GlueVersion" : " 2.0" ,
501
- "SecurityConfiguration" : " ETLJobSecurityConfig"
422
+ "NumberOfWorkers" : 2 ,
423
+ "SecurityConfiguration" : " ETLJobSecurityConfig" ,
424
+ "WorkerType" : " G.1X"
425
+ }
426
+ },
427
+ "CustomETLKinesisStreamGetRecordsIteratorAgeAlarmCD7F4E34" : {
428
+ "Type" : " AWS::CloudWatch::Alarm" ,
429
+ "Properties" : {
430
+ "ComparisonOperator" : " GreaterThanOrEqualToThreshold" ,
431
+ "EvaluationPeriods" : 1 ,
432
+ "AlarmDescription" : " Consumer Record Processing Falling Behind, there is risk for data loss due to record expiration." ,
433
+ "MetricName" : " GetRecords.IteratorAgeMilliseconds" ,
434
+ "Namespace" : " AWS/Kinesis" ,
435
+ "Period" : 300 ,
436
+ "Statistic" : " Maximum" ,
437
+ "Threshold" : 43200
438
+ }
439
+ },
440
+ "CustomETLKinesisStreamReadProvisionedThroughputExceededAlarm6AB32664" : {
441
+ "Type" : " AWS::CloudWatch::Alarm" ,
442
+ "Properties" : {
443
+ "ComparisonOperator" : " GreaterThanThreshold" ,
444
+ "EvaluationPeriods" : 1 ,
445
+ "AlarmDescription" : " Consumer Application is Reading at a Slower Rate Than Expected." ,
446
+ "MetricName" : " ReadProvisionedThroughputExceeded" ,
447
+ "Namespace" : " AWS/Kinesis" ,
448
+ "Period" : 300 ,
449
+ "Statistic" : " Average" ,
450
+ "Threshold" : 0
502
451
}
503
452
},
504
453
"GlueDatabase" : {
523
472
},
524
473
"TableInput" : {
525
474
"Parameters" : {
526
- "classication " : " json"
475
+ "classification " : " json"
527
476
},
528
477
"StorageDescriptor" : {
529
478
"Columns" : [
599
548
}
600
549
}
601
550
},
602
- "GlueJobPolicyAEA4B94E " : {
551
+ "CustomETLGlueJobPolicy0AE5B5CB " : {
603
552
"Type" : " AWS::IAM::Policy" ,
604
553
"Properties" : {
605
554
"PolicyDocument" : {
745
694
],
746
695
"Version" : " 2012-10-17"
747
696
},
748
- "PolicyName" : " GlueJobPolicyAEA4B94E " ,
697
+ "PolicyName" : " CustomETLGlueJobPolicy0AE5B5CB " ,
749
698
"Roles" : [
750
699
{
751
700
"Ref" : " CustomETLJobRole53A1671F"
783
732
]
784
733
}
785
734
}
735
+ },
736
+ "Parameters" : {
737
+ "BootstrapVersion" : {
738
+ "Type" : " AWS::SSM::Parameter::Value<String>" ,
739
+ "Default" : " /cdk-bootstrap/hnb659fds/version" ,
740
+ "Description" : " Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
741
+ }
742
+ },
743
+ "Rules" : {
744
+ "CheckBootstrapVersion" : {
745
+ "Assertions" : [
746
+ {
747
+ "Assert" : {
748
+ "Fn::Not" : [
749
+ {
750
+ "Fn::Contains" : [
751
+ [
752
+ " 1" ,
753
+ " 2" ,
754
+ " 3" ,
755
+ " 4" ,
756
+ " 5"
757
+ ],
758
+ {
759
+ "Ref" : " BootstrapVersion"
760
+ }
761
+ ]
762
+ }
763
+ ]
764
+ },
765
+ "AssertDescription" : " CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
766
+ }
767
+ ]
768
+ }
786
769
}
787
770
}
0 commit comments