-
Notifications
You must be signed in to change notification settings - Fork 647
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
[SOLUTION IN THREAD] "not found, ResolveEndpointV2" service modules before 11/15/23 are incompatible against newer root modules #2370
Comments
We've also noticed this bug in many of our modules in our dev environments since the sdk update, thank you for raising this issue. Edit: And it's not just affecting sqs. Many services seem to be returning this error, in particular on list/get operations which we've encountered in our integration tests. Our modules which worked fine before are failing for example when testing if specific Codebuild projects exist using codebuild.BatchGetProjects, returning the "ResolveEndpointV2" error. |
I just read the Release Notes.
|
I think this line might possibly be where the error is occurring. https://github.com/aws/smithy-go/blob/main/middleware/ordered_group.go#L217 |
It seems like an error is occurring because ResolveEndpointV2 is not in the array, but it has been successfuly added at this point. https://github.com/aws/aws-sdk-go-v2/blob/main/service/sqs/api_client.go#L139 |
We are also facing same issue while initialising the role := "arn:aws:iam::1222233333:role/sample-assume-role"
creds := stscreds.NewAssumeRoleProvider(stsSvc, role, func(aro *stscreds.AssumeRoleOptions) {
aro.RoleSessionName = "RoleSession"
aro.RoleARN = role
})
credCache := aws.NewCredentialsCache(creds)
credentials, err := credCache.Retrieve(ctx)
if err != nil {
// getting error as "failed to refresh cached credentials, not found, ResolveEndpointV2"
return aws.Credentials{}, err
} |
My earlier statement may have been incorrect. |
I think it's because the same
|
As you've called out from the release notes, we moved endpoint resolution from the That said, I can't reproduce this, at least not minimally. This snippet runs without hitting the middleware insert error:
What I'm not seeing in either of your examples is how your client is constructed. Are you doing anything to modify That aside I'm currently checking to see if we've missed anything that needed updated in our own APIs. The default path appears to be sound (our integration tests are all passing, this wouldn't have even been able to release if they hadn't), my current guess is we have some helper API somewhere that's still expecting |
@lucix-aws The AWS client config is initialised with region & request retryer. please check here full code-snippet package main
import (
"context"
"fmt"
"time"
"io"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/retry"
awsCfg "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/kms"
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
"github.com/aws/aws-sdk-go-v2/service/kms/types"
"github.com/aws/aws-sdk-go-v2/service/sts"
)
func main() {
ctx := context.Background()
region := "us-east-1"
kmsCfg, err := awsCfg.LoadDefaultConfig(ctx,
awsCfg.WithRetryer(func() aws.Retryer {
return retry.AddWithMaxAttempts(retry.NewStandard(), 10)
}),
awsCfg.WithRetryer(func() aws.Retryer {
return retry.AddWithMaxBackoffDelay(retry.NewStandard(), time.Duration(10))
}),
awsCfg.WithRegion(region),
)
if err != nil {
panic(err)
}
stsSvc := sts.NewFromConfig(kmsCfg)
role := "arn:aws:iam::1222233333:role/sample-assume-role"
creds := stscreds.NewAssumeRoleProvider(stsSvc, role, func(aro *stscreds.AssumeRoleOptions) {
aro.RoleSessionName = "RoleSession"
aro.RoleARN = role
})
credCache := aws.NewCredentialsCache(creds)
kmsCfg.Credentials = credCache
credentials, err := credCache.Retrieve(ctx)
if err != nil {
panic(err)
}
fmt.Println(credentials.AccessKeyID)
client := kms.NewFromConfig(kmsCfg)
res, err := client.GenerateDataKey(ctx, &kms.GenerateDataKeyInput{
KeyId: aws.String("arn:aws:kms:us-east-1:1122222333:key/21231232132132bf3232443242ae"),
KeySpec: types.DataKeySpecAes256,
EncryptionContext: map[string]string{"fake-user": "fake-value"},
}, func(o *kms.Options) {
o.RetryMaxAttempts = 5
o.EndpointOptions.Logger = o.Logger
})
if err != nil && err != io.EOF {
panic(err)
}
fmt.Println(&res.KeyId)
} |
fails for me. |
To @ucirello , @DeeptimanQlik , @khorii-cover , @KaeDig and anyone else facing this issue-- Please upgrade ALL of your dependencies under the github.com/aws/aws-sdk-go-v2 namespace to the latest tags from yesterday's release, that should resolve the issue. Please chime in with the results if you can. It appears that due to the breaking changes around middleware reordering, service client modules tagged on or after yesterday are now fundamentally incompatible with runtime modules tagged before yesterday (and vice versa). For example, in the case of @ucirello's package: This combination of versions is broken:
This combination is valid (I have verified that your tests under
More detailed explanation to follow. |
Thanks, it works for me with aws.NewCredentialsCache |
@lucix-aws this combination of dependencies is broken for me when using SSO
this code
gives this error
|
@koreyGambill does downgrading More specifically, I see you're using an SSO session config, if you're using an |
I hit this issue and got past it by upgrading the |
@lucix-aws Upgrading all the pending chore updates into one branch solves the issues for me. go get github.com/aws/aws-sdk-go-v2@v1.23.0
go get github.com/aws/aws-sdk-go-v2/service/kms@v1.26.2
go get github.com/aws/aws-sdk-go-v2/credentials@v1.16.1
go get github.com/aws/aws-sdk-go-v2/config@1.25.1 |
This resolves issues with endpoint changes in the SDK, see aws/aws-sdk-go-v2#2370, and upgrades s3iofs which has been upgraded to improve performance, see wolfeidau/s3iofs#25.
This resolves issues with endpoint changes in the SDK, see aws/aws-sdk-go-v2#2370, and upgrades s3iofs which has been upgraded to improve performance, see wolfeidau/s3iofs#25.
this is to resolve error not found, ResolveEndpointV2, see aws/aws-sdk-go-v2#2370
Some of these packages are <=v1.20 and some are >=v1.24 making it susceptible to aws/aws-sdk-go-v2#2370 Signed-off-by: Nghia Tran <[email protected]>
I also faced this issue in 1.24.1. I had to rollback to 1.23.0 to make it work |
This should resolve an issue with incompatible aws sdk modules. This is due to a recent update we did where we bumped some of them but not all. Normally this should be fine, however, a change in the aws sdk made old modules incompatible with new modules. More info: aws/aws-sdk-go-v2#2370 (comment)
This should resolve an issue with incompatible aws sdk modules. This is due to a recent update we did where we bumped some of them but not all. Normally this should be fine, however, a change in the aws sdk made old modules incompatible with new modules. More info: aws/aws-sdk-go-v2#2370 (comment)
## Summary * Resolves AWS Marketplace callback via FormBody `x-amzn-marketplace-token` * Add frontend workspace picker for the AWS Marketplace callback to connect the subscription. * Fix aws SDK error on push payload aws/aws-sdk-go-v2#2370 Tested to work with signed out user flow. ## How did you test this change? ![Screenshot from 2024-02-02 14-19-04](https://github.com/highlight/highlight/assets/1351531/a3331d4a-875b-4d05-9d91-656c110a04e0) https://www.loom.com/share/3a2e537ba02c42d98dccf3eeabbe81dc https://www.loom.com/share/c5540e1db6d0438b93476c43228c4de7 https://www.loom.com/share/185b00363bf049a19782c46744af9701 https://www.loom.com/share/e7af49f9b4df416b8e73aeb3a29652b1 ## Are there any deployment considerations? No ## Does this work require review from our design team? No
I'm still facing this issue while reading the secret manager
Expected Behavior Current Behavior
Compiler and Version used Operating System and version AWS Go SDK V2 Module Versions Used
|
All-- Since we're still getting comments on this issue, I think the diagnosis/solution has been somewhat buried. To reiterate: this error occurs when using a version of the core Upgrading all modules under the
This was originally diagnosed here, and you can read a post-mortem on this issue in this comment. To be absolutely clear, the bug users experienced here was NOT intentional, and CAN be avoided in the future independent of any middleware reordering we do. This incident has greatly informed how we should be writing/managing the code responsible for building the operation middleware stack. I've spawned #2507, the addressing of which should eliminate the possibility for breaks like this to occur in the future. To guarantee the visibility of this message, I'm going to lock this thread. If you are still seeing this issue after updating all of your SDK modules, please open a new issue. |
This discussion has been locked to preserve visibility of the solution, see the final comment accordingly. Original issue description follows...
Describe the bug
I am experiencing a
not found, ResolveEndpointV2
error.This error occurs during the process of marshaling a JSON object and passing it to the SQS SendMessage method.
Expected Behavior
The SendMessage method is expected to execute without errors.
Current Behavior
When executing the SendMessage method, the following error occurs:
Reproduction Steps
Possible Solution
No response
Additional Information/Context
The issue does not occur with previous versions of the SDK, and reverting to an earlier version resolves the issue.
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go1.21.4 linux/arm64
Operating System and version
Debian GNU/Linux 12 (bookworm)
The text was updated successfully, but these errors were encountered: