-
Notifications
You must be signed in to change notification settings - Fork 662
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
Role arn not read from profile in config when using config file with web_identity_token_file
#2469
Comments
Hi @imcdo , amazon-ecr-credential-helper Is not a product that the SDK team supports, therefore I cannot advise you on this particular problem. I suggest you create this issue on their repo. Thanks again, |
This issue is now closed. Comments on closed issues are hard for our team to see. |
@RanVaknin I understand that, however its the usage of this sdk that seems to be broken, not their product. |
Based on the line of code you said its throwing in, it seems like the SDK is not provided with the correct role to obtain credentials. I'm not familiar with this tool, therefore I suggest we wait to hear back from the ECR team about this. Perhaps they will be able to shed some light on the matter. Thanks, |
Thanks @RanVaknin will do. |
I'm going to have to close this due to both inactivity in the upstream ticket and inability to reproduce the issue described. The following sample program: package main
import (
"context"
"fmt"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
)
func main() {
cfg, err := config.LoadDefaultConfig(context.Background())
if err != nil {
log.Fatal(err)
}
fmt.Printf("%v\n", aws.IsCredentialsProvider(cfg.Credentials, &stscreds.WebIdentityRoleProvider{}))
} with the following shared config
Prints Without the ability to reproduce the described issue, this isn't actionable for the SDK team. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
When using amazon-ecr-credential-helper to pull from ECR, it fails to pull credentials from the default profile with the following stack trace:
The default profile in the
~/.aws/config
file is simply:the panic originally coming from this projects call here.
eventually throwing the error here
Expected Behavior
It reads the default profile as it was not specified in the environment variables, and reads the role name specified there.
Current Behavior
It fails to find the specified role name even though it is specified in the config.
Reproduction Steps
.aws/config
file that has a default profile that assumes a role via a web_identity_token_fileamazon-ecr-credential-helper
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
v1.26.3 for config
https://github.com/awslabs/amazon-ecr-credential-helper/blob/88cfadc80e8fe02f840937a6f9a638991f9e54f8/ecr-login/go.mod#L5-L15
Compiler and Version used
Operating System and version
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: