aws / amazon-ecs-cli

The Amazon ECS CLI enables users to run their applications on ECS/Fargate using the Docker Compose file format, quickly provision resources, push/pull images in ECR, and monitor running applications on ECS/Fargate.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI.html
Other
1.77k stars 302 forks source link

specify and existing Instance Profile #1125

Open donhill opened 3 years ago

donhill commented 3 years ago

I know using the ecs-cli I can specify an instance-role. Is there a way to specify an existing InstanceProfile when running `ecs up' ?

So I would like to use an existing instance profile instead of creating app-dev-001-EcsInstanceProfile-1O9LBWGDGGHP3

example error

iam:CreateInstanceProfile User: arn:aws:sts::xxx:assumed-role/ec2-gitlab-runner/i-instance is not authorized to perform: iam:CreateInstanceProfile on resource: arn:aws:iam::xxx:instance-profile/app-dev-001-EcsInstanceProfile-1O9LBWGDGGHP3" resourceType="AWS::IAM::InstanceProfile"