@@ -470,7 +470,7 @@ export abstract class BaseService extends Resource
470
470
resources : [ '*' ] ,
471
471
} ) ) ;
472
472
473
- const logGroupArn = logConfiguration ?. cloudWatchLogGroup ? `arn:aws :logs:${ this . stack . region } :${ this . stack . account } :log-group:${ logConfiguration . cloudWatchLogGroup . logGroupName } :*` : '*' ;
473
+ const logGroupArn = logConfiguration ?. cloudWatchLogGroup ? `arn:${ this . stack . partition } :logs:${ this . stack . region } :${ this . stack . account } :log-group:${ logConfiguration . cloudWatchLogGroup . logGroupName } :*` : '*' ;
474
474
this . taskDefinition . addToTaskRolePolicy ( new iam . PolicyStatement ( {
475
475
actions : [
476
476
'logs:CreateLogStream' ,
@@ -491,14 +491,14 @@ export abstract class BaseService extends Resource
491
491
actions : [
492
492
's3:PutObject' ,
493
493
] ,
494
- resources : [ `arn:aws :s3:::${ logConfiguration . s3Bucket . bucketName } /*` ] ,
494
+ resources : [ `arn:${ this . stack . partition } :s3:::${ logConfiguration . s3Bucket . bucketName } /*` ] ,
495
495
} ) ) ;
496
496
if ( logConfiguration . s3EncryptionEnabled ) {
497
497
this . taskDefinition . addToTaskRolePolicy ( new iam . PolicyStatement ( {
498
498
actions : [
499
499
's3:GetEncryptionConfiguration' ,
500
500
] ,
501
- resources : [ `arn:aws :s3:::${ logConfiguration . s3Bucket . bucketName } ` ] ,
501
+ resources : [ `arn:${ this . stack . partition } :s3:::${ logConfiguration . s3Bucket . bucketName } ` ] ,
502
502
} ) ) ;
503
503
}
504
504
}
@@ -518,7 +518,7 @@ export abstract class BaseService extends Resource
518
518
'kms:*' ,
519
519
] ,
520
520
resources : [ '*' ] ,
521
- principals : [ new iam . ArnPrincipal ( `arn:aws :iam::${ this . stack . account } :root` ) ] ,
521
+ principals : [ new iam . ArnPrincipal ( `arn:${ this . stack . partition } :iam::${ this . stack . account } :root` ) ] ,
522
522
} ) ) ;
523
523
524
524
if ( logging === ExecuteCommandLogging . DEFAULT || this . cluster . executeCommandConfiguration ?. logConfiguration ?. cloudWatchEncryptionEnabled ) {
@@ -533,7 +533,7 @@ export abstract class BaseService extends Resource
533
533
resources : [ '*' ] ,
534
534
principals : [ new iam . ServicePrincipal ( `logs.${ this . stack . region } .amazonaws.com` ) ] ,
535
535
conditions : {
536
- ArnLike : { 'kms:EncryptionContext:aws:logs:arn' : `arn:aws :logs:${ this . stack . region } :${ this . stack . account } :*` } ,
536
+ ArnLike : { 'kms:EncryptionContext:aws:logs:arn' : `arn:${ this . stack . partition } :logs:${ this . stack . region } :${ this . stack . account } :*` } ,
537
537
} ,
538
538
} ) ) ;
539
539
}
0 commit comments