File tree 3 files changed +82
-29
lines changed
packages/@aws-cdk/aws-synthetics
3 files changed +82
-29
lines changed Original file line number Diff line number Diff line change @@ -299,9 +299,13 @@ export class Canary extends cdk.Resource {
299
299
resources : [ '*' ] ,
300
300
actions : [ 's3:ListAllMyBuckets' ] ,
301
301
} ) ,
302
+ new iam . PolicyStatement ( {
303
+ resources : [ this . artifactsBucket . bucketArn ] ,
304
+ actions : [ 's3:GetBucketLocation' ] ,
305
+ } ) ,
302
306
new iam . PolicyStatement ( {
303
307
resources : [ this . artifactsBucket . arnForObjects ( `${ prefix ? prefix + '/*' : '*' } ` ) ] ,
304
- actions : [ 's3:PutObject' , 's3:GetBucketLocation' ] ,
308
+ actions : [ 's3:PutObject' ] ,
305
309
} ) ,
306
310
new iam . PolicyStatement ( {
307
311
resources : [ '*' ] ,
Original file line number Diff line number Diff line change 41
41
"Resource" : " *"
42
42
},
43
43
{
44
- "Action" : [
45
- " s3:PutObject" ,
46
- " s3:GetBucketLocation"
47
- ],
44
+ "Action" : " s3:GetBucketLocation" ,
45
+ "Effect" : " Allow" ,
46
+ "Resource" : {
47
+ "Fn::GetAtt" : [
48
+ " MyCanaryArtifactsBucket89975E6D" ,
49
+ " Arn"
50
+ ]
51
+ }
52
+ },
53
+ {
54
+ "Action" : " s3:PutObject" ,
48
55
"Effect" : " Allow" ,
49
56
"Resource" : {
50
57
"Fn::Join" : [
197
204
"Resource" : " *"
198
205
},
199
206
{
200
- "Action" : [
201
- " s3:PutObject" ,
202
- " s3:GetBucketLocation"
203
- ],
207
+ "Action" : " s3:GetBucketLocation" ,
208
+ "Effect" : " Allow" ,
209
+ "Resource" : {
210
+ "Fn::GetAtt" : [
211
+ " MyCanaryArtifactsBucket89975E6D" ,
212
+ " Arn"
213
+ ]
214
+ }
215
+ },
216
+ {
217
+ "Action" : " s3:PutObject" ,
204
218
"Effect" : " Allow" ,
205
219
"Resource" : {
206
220
"Fn::Join" : [
Original file line number Diff line number Diff line change 30
30
"Resource" : " *"
31
31
},
32
32
{
33
- "Action" : [
34
- " s3:PutObject" ,
35
- " s3:GetBucketLocation"
36
- ],
33
+ "Action" : " s3:GetBucketLocation" ,
34
+ "Effect" : " Allow" ,
35
+ "Resource" : {
36
+ "Fn::GetAtt" : [
37
+ " mytestbucket8DC16178" ,
38
+ " Arn"
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ "Action" : " s3:PutObject" ,
37
44
"Effect" : " Allow" ,
38
45
"Resource" : {
39
46
"Fn::Join" : [
210
217
"Resource" : " *"
211
218
},
212
219
{
213
- "Action" : [
214
- " s3:PutObject" ,
215
- " s3:GetBucketLocation"
216
- ],
220
+ "Action" : " s3:GetBucketLocation" ,
221
+ "Effect" : " Allow" ,
222
+ "Resource" : {
223
+ "Fn::GetAtt" : [
224
+ " MyCanaryOneArtifactsBucketDF4A487D" ,
225
+ " Arn"
226
+ ]
227
+ }
228
+ },
229
+ {
230
+ "Action" : " s3:PutObject" ,
217
231
"Effect" : " Allow" ,
218
232
"Resource" : {
219
233
"Fn::Join" : [
424
438
"Resource" : " *"
425
439
},
426
440
{
427
- "Action" : [
428
- " s3:PutObject" ,
429
- " s3:GetBucketLocation"
430
- ],
441
+ "Action" : " s3:GetBucketLocation" ,
442
+ "Effect" : " Allow" ,
443
+ "Resource" : {
444
+ "Fn::GetAtt" : [
445
+ " MyCanaryTwoArtifactsBucket79B179B6" ,
446
+ " Arn"
447
+ ]
448
+ }
449
+ },
450
+ {
451
+ "Action" : " s3:PutObject" ,
431
452
"Effect" : " Allow" ,
432
453
"Resource" : {
433
454
"Fn::Join" : [
638
659
"Resource" : " *"
639
660
},
640
661
{
641
- "Action" : [
642
- " s3:PutObject" ,
643
- " s3:GetBucketLocation"
644
- ],
662
+ "Action" : " s3:GetBucketLocation" ,
663
+ "Effect" : " Allow" ,
664
+ "Resource" : {
665
+ "Fn::GetAtt" : [
666
+ " MyCanaryThreeArtifactsBucket894E857E" ,
667
+ " Arn"
668
+ ]
669
+ }
670
+ },
671
+ {
672
+ "Action" : " s3:PutObject" ,
645
673
"Effect" : " Allow" ,
646
674
"Resource" : {
647
675
"Fn::Join" : [
852
880
"Resource" : " *"
853
881
},
854
882
{
855
- "Action" : [
856
- " s3:PutObject" ,
857
- " s3:GetBucketLocation"
858
- ],
883
+ "Action" : " s3:GetBucketLocation" ,
884
+ "Effect" : " Allow" ,
885
+ "Resource" : {
886
+ "Fn::GetAtt" : [
887
+ " MyPythonCanaryArtifactsBucket7AE88133" ,
888
+ " Arn"
889
+ ]
890
+ }
891
+ },
892
+ {
893
+ "Action" : " s3:PutObject" ,
859
894
"Effect" : " Allow" ,
860
895
"Resource" : {
861
896
"Fn::Join" : [
You can’t perform that action at this time.
0 commit comments