AWSTemplateFormatVersion: '2010-09-09' Description: IAM Role allowing ECS service to assume the role (trust policy). Resources: ECSForInfrastructureManagementRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Sid: AllowAccessToECSForInfrastructureManagement Effect: Allow Principal: Service: ecs.amazonaws.com Action: sts:AssumeRole ManagedPolicyArns: - arn:aws:iam::aws:policy/AmazonECSInfrastructureRolePolicyForLoadBalancers Outputs: ECSForInfrastructureManagementRoleArn: Description: ARN of the ECS role Value: !GetAtt ECSForInfrastructureManagementRole.Arn Export: Name: ECSForInfrastructureManagementRoleArn