Skip to content

The security token included in the request is expired #704

@victoramsantos

Description

@victoramsantos

Hi, I running prometheus-elasticache-sd with the last version in a Kubernetes cluster (v1.28.5-eks) which add ServiceAccount to the pod using kube2iam.
I started to see some error messages related to ExpiredToken: The security token included in the request is expired, like this one:

ts=2024-05-23T21:00:28.336Z caller=main.go:325 level=info msg="Starting prometheus-elasticache-sd" version="(version=1.0.291, branch=main, revision=e27b3eae045857eb3fe9db27376e9fac82c3d752)"
...
ts=2024-05-24T00:01:31.622Z caller=main.go:234 level=warn msg="could not list tags" err="operation error ElastiCache: ListTagsForResource, https response error StatusCode: 403, RequestID: reqid, api error ExpiredToken: The security token included in the request is expired" ARN=arn status=available

After some research I found that aws-sdk-go-v2 doesn't refresh the AWS token, it just loads and leaves it in memory (ref).

Would be possible to update prometheus-elasticache-sd to sporadically refresh this credential?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions