-
Notifications
You must be signed in to change notification settings - Fork 717
Closed as not planned
Description
Acknowledgements
- I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
- I have verified all of my SDK modules are up-to-date (you can perform a bulk update with
go get -u github.com/aws/aws-sdk-go-v2/...
)
Describe the bug
When sso-session name contains space, Go SDK cannot find it and crashes with Error loading configuration: failed to find SSO session section
. AWS CLI works just fine.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Program ends successfully, number of buckets is printed
Current Behavior
Error loading configuration: failed to find SSO session section, Andrzej Ressel
error
Reproduction Steps
package main
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
func main() {
cfg, err := config.LoadDefaultConfig(context.Background(),
config.WithSharedConfigProfile("AndrzejRessel"),
config.WithRegion("us-east-1"),
config.WithClientLogMode(aws.LogRequestWithBody|aws.LogResponseWithBody),
)
if err != nil {
fmt.Println("Error loading configuration:", err)
return
}
svc := s3.NewFromConfig(cfg)
result, err := svc.ListBuckets(context.Background(), &s3.ListBucketsInput{})
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("there are %v buckets", len(result.Buckets))
}
Possible Solution
No response
Additional Information/Context
$ cat config
[profile AndrzejRessel]
sso_session = Andrzej Ressel
sso_account_id = REDACTED
sso_role_name = AdministratorAccess
[sso-session 'Andrzej Ressel']
sso_start_url = https://d-REDACTED.awsapps.com/start
sso_region = us-east-1
sso_registration_scopes = sso:account:access
AWS Go SDK V2 Module Versions Used
require (
github.com/aws/aws-sdk-go-v2 v1.39.0
github.com/aws/aws-sdk-go-v2/config v1.31.8
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.1
)
Compiler and Version used
go version go1.25.1 windows/amd64
Operating System and version
Windows 11
Metadata
Metadata
Assignees
Labels
No labels