1

I have set up a GitLab runner on AWS fargate. It works perfectly fine one time and after some time it throws ExpiredTokenException while running jobs.

ERRO[2022-04-07T04:04:31Z] Application execution failed                  PID=16444 error="starting new Fargate task: running new task on Fargate: error starting AWS Fargate Task: ExpiredTokenException: The security token included in the request is expired\n\tstatus code: 400, request id: xxxxxxxxxx"

I have read troubleshoot docs from Gitlab and AWS but there is no related information about ExpiredTokenException. The links are:

I would appreciate any lead to this problem.

dawanse
  • 149
  • 3
  • 14
  • I have found a similar question https://stackoverflow.com/questions/35685729/the-security-token-included-in-the-request-is-expired but not sure whether it works or not. – dawanse Apr 07 '22 at 04:51
  • In my case, while building AWS resources using CDK and for that, I have created a role and assigned that role to the task definition. The problem was the session of that role is 1 hour by default so within that hour it works normally but after the session expires it throws `ExpiredTokenException`. For more details https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_iam/Role.html – dawanse Apr 08 '22 at 00:48

0 Answers0