diff --git a/packages/@aws-cdk/aws-ecs/lib/drain-hook/instance-drain-hook.ts b/packages/@aws-cdk/aws-ecs/lib/drain-hook/instance-drain-hook.ts index 49e4bd2bd6ddd..f436138178c5e 100644 --- a/packages/@aws-cdk/aws-ecs/lib/drain-hook/instance-drain-hook.ts +++ b/packages/@aws-cdk/aws-ecs/lib/drain-hook/instance-drain-hook.ts @@ -70,7 +70,7 @@ export class InstanceDrainHook extends cdk.Construct { heartbeatTimeout: drainTime, }); - const containerInstanceResource = Stack.of(this).formatArn({ + const containerInstanceArn = Stack.of(this).formatArn({ service: 'ecs', resource: 'containerInstance', resourceName: props.cluster.clusterName.concat('*') @@ -115,7 +115,7 @@ export class InstanceDrainHook extends cdk.Construct { 'ecs:UpdateContainerInstancesState', 'ecs:ListTasks' ], - resources: [containerInstanceResource] + resources: [containerInstanceArn] })); } }