'ExpiredTokenException' During Rekognition Batch Processing with Temporary Credentials
'ExpiredTokenException' During Rekognition Batch Processing with Temporary Credentials # AWS # AmazonRekognition # IAM # CloudSecurity Why temporary credentials expire mid-batch and how to prevent Rekognition failures in long-running jobs Category: IAM & Permission Boundaries Problem Your application processes images in batches using Amazon Rekognition . The first several requests succeed. Then the job fails mid-run with: ExpiredTokenException: The security token included in the request is expired Rekognition permissions are correct. IAM policies are valid. Nothing changed. Yet the process stops halfway through. Clarifying the Issue Your application is using temporary credentials . These are issued by: sts:AssumeRole Federated login AWS SSO IAM Roles for EC2 or Lambda Temporary credentials include: Access key Secret key Session token Expiration timestamp Once the expiration time is reached, all API calls fail — even if permissions are correct. Rekognition is not d...