-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating an AWS Config WithCredentials fails #3282
Comments
Hi @lucianthorr, thanks for reaching out to us. This sounds like it's related to the changes brought into the instance metadata service with IMDSv2. Version 1.25.38 introduced support for the secure token required for IMDSv2 which explains why you're not seeing this behavior on 1.23.5 or 1.12.72. We're working with the EKS team internally to mitigate this behavior, in the meantime you should be able to configure your instance's metadata options with an appropriate hop limit based on your use case to reach the underlying instance's metadata service as expected. |
HI @lucianthorr are you still running into this issue? If so any additional details you have would be helpful. As @diehlaws mentioned, it sounds like the |
This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled. |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
Generating a new AWS Config fails when using credentials from an ec2RoleProvider.
Returns a 403-Unauthorized from the /latest/api/token endpoint (ec2metadata/GetToken)
The code used to do this worked on previous versions of the aws-sdk-go
Worked on v1.23.5 and v1.12.72
Version of AWS SDK for Go?
v1.30.8
Version of Go (
go version
)?1.13.5
To Reproduce (observed behavior)
Code is as follows:
Expected behavior
Should successfully return a config but instead fails after logging 403 Response at the debug log level.
Additional context
This code is used to more reliably generate an aws Config in a kubernetes cluster that uses kube2iam to provide credentials to pods.
The text was updated successfully, but these errors were encountered: