I am setting up an AWS ECS Service using cloudformation and yaml syntax.
At some point, in the relevant documentation there is a property called Role whose definitions is the following:
Role
The name or ARN of an AWS Identity and Access Management (IAM) role that allows your Amazon ECS container agent to make calls to your load balancer.
Note In some cases, you might need to add a dependency on the service role's policy. For more information, see IAM role policy in DependsOn Attribute. Required: No Type: String Update requires: Replacement
Since I intend to place the specific service behind an Application Load Balancer, is this property needed?
If so, do I need to create a new policy or are there any pre-defined policies that can serve this purpose?
Would it be enough if I just added the role/policy on the EC2 container instance level (e.g. append it in the relevant template that creates the ECS cluster offered by amazon?)
I would really appreciate any examples or use cases if any because the documentation is vague and incomplete on the topic.

You need the Role attribute if you want to use the
Application Load balancerwith yourECS service. As per the description the role allows yourECSservice agent to connect to load balancer. If you are not using load balancer then, the field is optional.Also setting the role on
EC2instance level is not needed. Since there are some policies which are related to ECS services, adding it at instance level role is not valid.Please find below AWS managed polices to create the role:
Trust relationship: