IRSA with aws-sdk getting "InvalidToken: The provided token is malformed or otherwise invalid." #3697
Closed
3 tasks done
Labels
bug
This issue is a bug.
closed-for-staleness
response-requested
Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
I am trying to implement IRSA in my EKS cluster. I used eksctl to create the service account. I deployed the docker to EKS cluster that has an API to upload file. When I try to upload the file, I get the error: "InvalidToken: The provided token is malformed or otherwise invalid.".
I then created a simple js script to test aws-sdk and I successfully reproduced the same error.
I had a doubt on whether I successfully granted the permission to the pod. So, I used
aws-cli
to check the permission. I rankubectl exec
to jump into the pod and ranaws s3 cp
to upload a file to my target bucket. Since I have 2 buckets and I only granted the permission for one of them, I verified that I can only upload a file to the S3 bucket that I have granted the permission to the pod. Thus, I think the IRSA setting is correct. It may be just an issue occurs on aws-sdk.Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
No
Details of the browser/Node.js version
v15.13.0
SDK version number
2.767.0
To Reproduce (observed behavior)
Here is the ClusterConfig
Expected behavior
successfully upload file
The text was updated successfully, but these errors were encountered: