title: AWS CDK - role and policy creation
body: <p>How can I translate this CloudFormation to CDK (JavaScript or Java)? I was trying to do it, but this is the first time that I work with CDK and I'm not sure how to do it.</p>
  <pre><code>FargateTaskExecutionServiceRole:
  Type: AWS::IAM::Role
  Properties:
    AssumeRolePolicyDocument:
      Statement:
      - Effect: Allow
        Principal:
          Service: 
            - ecs-tasks.amazonaws.com
        Action:
          - sts:AssumeRole
    Policies:
      - PolicyName: AmazonECSTaskExecutionRolePolicy
        PolicyDocument:
          Version: &quot;2012-10-17&quot;
          Statement:
          - Effect: Allow
            Action:
              - 'ecr:GetAuthorizationToken'
              - 'ecr:BatchCheckLayerAvailability'
              - 'ecr:GetDownloadUrlForLayer'
              - 'ecr:BatchGetImage'
              - 'logs:CreateLogStream'
              - 'logs:PutLogEvents'
            Resource: '*'
  </code></pre>