Skip to content

馃悰 Refresh Kinesis client credentials when using task role - #2159

Closed
PrenticeRoosevelt wants to merge 1 commit into
sequinstream:mainfrom
coinwise-io:fix/kinesis-task-role-refresh
Closed

PrenticeRoosevelt wants to merge 1 commit into
sequinstream:mainfrom
coinwise-io:fix/kinesis-task-role-refresh

Conversation

@PrenticeRoosevelt

Copy link
Copy Markdown

The Kinesis pipeline built its AWS client once in init/2 and reused it forever. With task role credentials (ECS task role, EKS IRSA, instance profile) the session token expires (1h for IRSA), so every PutRecords failed with "The security token included in the request is expired" until the pipeline restarted, even though aws_credentials had already refreshed the credentials.

Rebuild the client from aws_credentials at most once a minute when the sink uses task role. aws_credentials refreshes credentials 5 minutes before expiry, so the client always carries a valid token. Sinks with explicit access keys are unchanged.

Refs #2078

The Kinesis pipeline built its AWS client once in init/2 and reused it
forever. With task role credentials (ECS task role, EKS IRSA, instance
profile) the session token expires (1h for IRSA), so every PutRecords
failed with "The security token included in the request is expired"
until the pipeline restarted, even though aws_credentials had already
refreshed the credentials.

Rebuild the client from aws_credentials at most once a minute when the
sink uses task role. aws_credentials refreshes credentials 5 minutes
before expiry, so the client always carries a valid token. Sinks with
explicit access keys are unchanged.

Refs #2078

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PrenticeRoosevelt
PrenticeRoosevelt deleted the fix/kinesis-task-role-refresh branch October 7, 2026 17:25
@PrenticeRoosevelt
PrenticeRoosevelt restored the fix/kinesis-task-role-refresh branch October 7, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant