For example, when making a task definition:
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDefinition', {
networkMode: ecs.NetworkMode.AWS_VPC,
})
This makes the role automatically, and named automatically.
From the document, there is property to set the role, but it accepts IRole
not name.
Is there any method to name the role which is automatically created?
Alternatively, I suppose I should use class Role to make role in advance and attache this to the Ec2TaskDefinition
?, however how can I know the role property?