Skip to content

Commit 210ed8f

Browse files
nija-atmergify[bot]
authored andcommitted
fix(ecs): IAM role ARN must not specific region. (#3755)
fixes #3733
1 parent b67b0f3 commit 210ed8f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/@aws-cdk/aws-ecs/lib/base/base-service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ export abstract class BaseService extends Resource
328328
private makeAutoScalingRole(): iam.IRole {
329329
// Use a Service Linked Role.
330330
return iam.Role.fromRoleArn(this, 'ScalingRole', Stack.of(this).formatArn({
331+
region: '',
331332
service: 'iam',
332333
resource: 'role/aws-service-role/ecs.application-autoscaling.amazonaws.com',
333334
resourceName: 'AWSServiceRoleForApplicationAutoScaling_ECSService',

packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.expected.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,7 @@
514514
{
515515
"Ref": "AWS::Partition"
516516
},
517-
":iam:",
518-
{
519-
"Ref": "AWS::Region"
520-
},
521-
":",
517+
":iam::",
522518
{
523519
"Ref": "AWS::AccountId"
524520
},

0 commit comments

Comments
 (0)