45
45
},
46
46
"PolicyDocument" : {
47
47
"Statement" : [
48
- {
49
- "Action" : [
50
- " s3:GetBucket*" ,
51
- " s3:List*" ,
52
- " s3:DeleteObject*"
53
- ],
54
- "Effect" : " Allow" ,
55
- "Principal" : {
56
- "AWS" : {
57
- "Fn::GetAtt" : [
58
- " CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" ,
59
- " Arn"
60
- ]
61
- }
62
- },
63
- "Resource" : [
64
- {
65
- "Fn::GetAtt" : [
66
- " tests3sqsS3LoggingBucket0B0BC86A" ,
67
- " Arn"
68
- ]
69
- },
70
- {
71
- "Fn::Join" : [
72
- " " ,
73
- [
74
- {
75
- "Fn::GetAtt" : [
76
- " tests3sqsS3LoggingBucket0B0BC86A" ,
77
- " Arn"
78
- ]
79
- },
80
- " /*"
81
- ]
82
- ]
83
- }
84
- ]
85
- },
86
48
{
87
49
"Action" : " *" ,
88
50
"Condition" : {
123
85
}
124
86
}
125
87
},
126
- "tests3sqsS3LoggingBucketAutoDeleteObjectsCustomResource054A5A8A" : {
127
- "Type" : " Custom::S3AutoDeleteObjects" ,
128
- "Properties" : {
129
- "ServiceToken" : {
130
- "Fn::GetAtt" : [
131
- " CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" ,
132
- " Arn"
133
- ]
134
- },
135
- "BucketName" : {
136
- "Ref" : " tests3sqsS3LoggingBucket0B0BC86A"
137
- }
138
- },
139
- "DependsOn" : [
140
- " tests3sqsS3LoggingBucketPolicy3A15958C"
141
- ],
142
- "UpdateReplacePolicy" : " Delete" ,
143
- "DeletionPolicy" : " Delete"
144
- },
145
88
"tests3sqsS3BucketNotifications32539247" : {
146
89
"Type" : " Custom::S3BucketNotifications" ,
147
90
"Properties" : {
536
479
]
537
480
}
538
481
},
539
- "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" : {
540
- "Type" : " AWS::IAM::Role" ,
541
- "Properties" : {
542
- "AssumeRolePolicyDocument" : {
543
- "Version" : " 2012-10-17" ,
544
- "Statement" : [
545
- {
546
- "Action" : " sts:AssumeRole" ,
547
- "Effect" : " Allow" ,
548
- "Principal" : {
549
- "Service" : " lambda.amazonaws.com"
550
- }
551
- }
552
- ]
553
- },
554
- "ManagedPolicyArns" : [
555
- {
556
- "Fn::Sub" : " arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
557
- }
558
- ]
559
- }
560
- },
561
- "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" : {
562
- "Type" : " AWS::Lambda::Function" ,
563
- "Properties" : {
564
- "Code" : {
565
- "S3Bucket" : {
566
- "Ref" : " AssetParameters00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494S3Bucket33B61C3E"
567
- },
568
- "S3Key" : {
569
- "Fn::Join" : [
570
- " " ,
571
- [
572
- {
573
- "Fn::Select" : [
574
- 0 ,
575
- {
576
- "Fn::Split" : [
577
- " ||" ,
578
- {
579
- "Ref" : " AssetParameters00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494S3VersionKeyDE2514FF"
580
- }
581
- ]
582
- }
583
- ]
584
- },
585
- {
586
- "Fn::Select" : [
587
- 1 ,
588
- {
589
- "Fn::Split" : [
590
- " ||" ,
591
- {
592
- "Ref" : " AssetParameters00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494S3VersionKeyDE2514FF"
593
- }
594
- ]
595
- }
596
- ]
597
- }
598
- ]
599
- ]
600
- }
601
- },
602
- "Timeout" : 900 ,
603
- "MemorySize" : 128 ,
604
- "Handler" : " __entrypoint__.handler" ,
605
- "Role" : {
606
- "Fn::GetAtt" : [
607
- " CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" ,
608
- " Arn"
609
- ]
610
- },
611
- "Runtime" : " nodejs12.x" ,
612
- "Description" : {
613
- "Fn::Join" : [
614
- " " ,
615
- [
616
- " Lambda function for auto-deleting objects in " ,
617
- {
618
- "Ref" : " tests3sqsS3LoggingBucket0B0BC86A"
619
- },
620
- " S3 bucket."
621
- ]
622
- ]
623
- }
624
- },
625
- "DependsOn" : [
626
- " CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
627
- ]
628
- },
629
482
"BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" : {
630
483
"Type" : " AWS::IAM::Role" ,
631
484
"Properties" : {
728
581
}
729
582
}
730
583
}
731
- },
732
- "Parameters" : {
733
- "AssetParameters00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494S3Bucket33B61C3E" : {
734
- "Type" : " String" ,
735
- "Description" : " S3 bucket for asset \" 00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494\" "
736
- },
737
- "AssetParameters00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494S3VersionKeyDE2514FF" : {
738
- "Type" : " String" ,
739
- "Description" : " S3 key for asset version \" 00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494\" "
740
- },
741
- "AssetParameters00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494ArtifactHashC2E6E6C0" : {
742
- "Type" : " String" ,
743
- "Description" : " Artifact hash for asset \" 00f2465b209575c44977ca8ff1c81d86d002849272ede5a8a90ac87dfff1e494\" "
744
- }
745
584
}
746
585
}
0 commit comments