Starting and Stopping of Windows ECS instance causes issues with ECS-Agent

0

Hi ,
I have an ECS cluster which has "EnableTaskIAMRole" enabled while launching windows instance.

When i launch a container for the first time it uses task execution role and runs the containers smoothly, but when i stop&start/reboot/restart the instance and try to launch the container it gives "Unable to retrieve credentials" .
I deployed .Net application in windows Container which uses IAM role to reach out to AWS Secret Manager , but once i restart the instance and re-deploy container it returns the error before stopping .

I have to run the below command in powershell to make it work again(Reinitialize ECSAgent) Initialize-ECSAgent -Cluster 'WorkerContainers' -EnableTaskIAMRole -Version latest

It's really confusing why it works only when i reinitialize the agent, I researched a lot but not able to resolve the issue.Please help me.

Edited by: Sritop95 on Jun 5, 2020 9:24 AM

질문됨 4년 전388회 조회
1개 답변
0

I resolved the issue by launching new instance with updated AMI Windows_Server-2019-English-Full-ECS_Optimized-2020.04.16 (ami-0a91e15865acb2904) .

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠