title: How to use IRole in AWS CDK
body: <p>Hi I am working on AWS CDK. I have created one role as below.</p>
  
  <pre><code> MWSAutoscalingRole = iam.Role(self, 'MWSAutoscalingRole',
          assumed_by=iam.ServicePrincipal('application-autoscaling.amazonaws.com'))
  
          MWSAutoscalingRole.add_to_policy(iam.PolicyStatement(
          effect=iam.Effect.ALLOW,
          resources=["*"],
          actions=["application-autoscaling:*"]
          ))
  </code></pre>
  
  <p>Now I want to assign this role to scalable target as below.</p>
  
  <pre><code>asg.ScalableTarget(self, id = "scalable target", min_capacity = 1, max_capacity = 1, resource_id = "service", role= [iam.IRole.role_name["MWSAutoscalingRole"]], scalable_dimension = "1", service_namespace = asg.ServiceNamespace.ECS)
  </code></pre>
  
  <p>In the above code, <code>role= [iam.IRole.role_name["MWSAutoscalingRole"]]</code> is not working. The right syntax for this is <code>role: typing.Optional[aws_cdk.aws_iam.IRole]=None</code> </p>
  
  <p>The implementation above is not working. Can someone help me to fix this?</p>