I am curious how roles are working in general and specificaly in ECS with Task Roles. So as I read from the docs roles are using Temporary Security Credentials to authenticate in AWS and then authorize using it's (role's) permissions and then make some actions with API. Right? But I also read from docs that every principal (let's say my ECS container agent on my EC2 instance or task that is managed by it) must be authenticated using some identity.
Does that mean that role is an identity and principal that can somehow authenitcate into AWS and allow my tasks to make API calls?
If so then how my tasks will be able to make API calls when Temporary Security Credentials limited lifetime will expire? They use roles, roles use TSC, TSC has limited lifetime - tasks have limited time to make API calls, right?