Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between ecs.amazonaws.com and ecs-tasks.amazonaws.com?

https://gist.github.com/meoooh/896b66e0fc5c9bfd5716fc1864a7c68b

If I have two iam role.

But I don't know difference

like image 670
chobo Avatar asked Apr 12 '19 01:04

chobo


1 Answers

One IAM role is used by ECS service scheduler to make calls to the Amazon EC2 and Elastic Load Balancing APIs on your behalf to register and deregister container instances with your load balancers. This is the role that has the principal ecs.amazonaws.com.

The second IAM role is used by the containers that are created in your tasks. This is the role that has the principal: ecs-tasks.amazonaws.com.

AWS documentation:

  • Details about IAM role used by ECS scheduler can be found here.
  • Details about IAM role used by containers in your tasks can be found here. Further explanation for this can be found here.
like image 176
krishna_mee2004 Avatar answered Oct 13 '22 17:10

krishna_mee2004