Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

sdk_apimanagement for a Websocket in Lambda - Error: NoMatchingAuthScheme #978

Closed
Sandy-Garrido opened this issue Nov 29, 2023 · 1 comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@Sandy-Garrido
Copy link

Sandy-Garrido commented Nov 29, 2023

Describe the bug

Prefacing this issue with the fact that it could be my misconfiguring.

I'm currently having trouble posting a message back to a connection via a Websocket API.

I've tried a few things such as getting credentials using some of the methods I've seen around github but whichever way I do try I just haven't managed to crack the right combination.

I have a lambda role which I usually set privs there but it doesn't seem to even work when I give it full admin. I assumed action execute-api:ManageConnections would suffice?

Expected Behavior

I just expected either a less confusing error message or a success :D

Current Behavior

Error sending message to connection: 
DispatchFailure(DispatchFailure 
{ source: ConnectorError { kind: Other(None), 
source: NoMatchingAuthScheme, connection: Unknown } })

Reproduction Steps

// not 100% certain what endpoint url it needs here?
// https://xxxxx.execute-api.xx-xx-xx.amazonaws.com/dev/@connections ??
let endpoint_url = "xxxxxx";

let config = SdkConfig::builder()
  .endpoint_url(endpoint_url)
  .behavior_version(BehaviorVersion::latest())
  .build();
let client = aws_sdk_apigatewaymanagement::Client::new(&config);

client
  .post_to_connection()
  .connection_id(connection_id)
  .data(data_as_blob)
  .send().await;

Possible Solution

No response

Additional Information/Context

No response

Version

├── aws-config v1.0.1
│   ├── aws-credential-types v1.0.1
│   │   ├── aws-smithy-async v1.0.1
│   │   ├── aws-smithy-runtime-api v1.0.1
│   │   │   ├── aws-smithy-async v1.0.1 (*)
│   │   │   ├── aws-smithy-types v1.0.1
│   │   ├── aws-smithy-types v1.0.1 (*)
│   ├── aws-http v0.60.0
│   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-types v1.0.1
│   │   │   ├── aws-credential-types v1.0.1 (*)
│   │   │   ├── aws-smithy-async v1.0.1 (*)
│   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   │   ├── aws-smithy-types v1.0.1 (*)
│   ├── aws-runtime v1.0.1
│   │   ├── aws-credential-types v1.0.1 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-sigv4 v1.0.1
│   │   │   ├── aws-credential-types v1.0.1 (*)
│   │   │   ├── aws-smithy-http v0.60.0
│   │   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   │   │   ├── aws-smithy-types v1.0.1 (*)
│   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-smithy-async v1.0.1 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-types v1.0.1 (*)
│   ├── aws-sdk-sso v1.1.0
│   │   ├── aws-credential-types v1.0.1 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.1 (*)
│   │   ├── aws-smithy-async v1.0.1 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0
│   │   │   └── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-smithy-runtime v1.0.1
│   │   │   ├── aws-smithy-async v1.0.1 (*)
│   │   │   ├── aws-smithy-http v0.60.0 (*)
│   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-types v1.0.1 (*)
│   ├── aws-sdk-ssooidc v1.1.0
│   │   ├── aws-credential-types v1.0.1 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.1 (*)
│   │   ├── aws-smithy-async v1.0.1 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0 (*)
│   │   ├── aws-smithy-runtime v1.0.1 (*)
│   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-types v1.0.1 (*)
│   ├── aws-sdk-sts v1.3.0
│   │   ├── aws-credential-types v1.0.1 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.1 (*)
│   │   ├── aws-smithy-async v1.0.1 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0 (*)
│   │   ├── aws-smithy-query v0.60.0
│   │   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-smithy-runtime v1.0.1 (*)
│   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-smithy-xml v0.60.0
│   │   ├── aws-types v1.0.1 (*)
│   ├── aws-smithy-async v1.0.1 (*)
│   ├── aws-smithy-http v0.60.0 (*)
│   ├── aws-smithy-json v0.60.0 (*)
│   ├── aws-smithy-runtime v1.0.1 (*)
│   ├── aws-smithy-runtime-api v1.0.1 (*)
│   ├── aws-smithy-types v1.0.1 (*)
│   ├── aws-types v1.0.1 (*)
├── aws-sdk-apigatewaymanagement v1.3.0
│   ├── aws-credential-types v1.0.1 (*)
│   ├── aws-http v0.60.0 (*)
│   ├── aws-runtime v1.0.1 (*)
│   ├── aws-smithy-async v1.0.1 (*)
│   ├── aws-smithy-http v0.60.0 (*)
│   ├── aws-smithy-json v0.60.0 (*)
│   ├── aws-smithy-runtime v1.0.1 (*)
│   ├── aws-smithy-runtime-api v1.0.1 (*)
│   ├── aws-smithy-types v1.0.1 (*)
│   ├── aws-types v1.0.1 (*)
├── aws-sdk-cognitoidentityprovider v1.3.0
│   ├── aws-credential-types v1.0.1 (*)
│   ├── aws-http v0.60.0 (*)
│   ├── aws-runtime v1.0.1 (*)
│   ├── aws-smithy-async v1.0.1 (*)
│   ├── aws-smithy-http v0.60.0 (*)
│   ├── aws-smithy-json v0.60.0 (*)
│   ├── aws-smithy-runtime v1.0.1 (*)
│   ├── aws-smithy-runtime-api v1.0.1 (*)
│   ├── aws-smithy-types v1.0.1 (*)
│   ├── aws-types v1.0.1 (*)
├── aws-sdk-dynamodb v1.3.0
│   ├── aws-credential-types v1.0.1 (*)
│   ├── aws-http v0.60.0 (*)
│   ├── aws-runtime v1.0.1 (*)
│   ├── aws-smithy-async v1.0.1 (*)
│   ├── aws-smithy-http v0.60.0 (*)
│   ├── aws-smithy-json v0.60.0 (*)
│   ├── aws-smithy-runtime v1.0.1 (*)
│   ├── aws-smithy-runtime-api v1.0.1 (*)
│   ├── aws-smithy-types v1.0.1 (*)
│   ├── aws-types v1.0.1 (*)
├── aws-sdk-sts v1.3.0 (*)
│   ├── aws-sdk-dynamodb v0.39.0
│   │   ├── aws-credential-types v1.0.1 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.1 (*)
│   │   ├── aws-smithy-async v1.0.1 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0 (*)
│   │   ├── aws-smithy-runtime v1.0.1 (*)
│   │   ├── aws-smithy-runtime-api v1.0.1 (*)
│   │   ├── aws-smithy-types v1.0.1 (*)
│   │   ├── aws-types v1.0.1 (*)

Environment details (OS name and version, etc.)

Custom runtime on Amazon Linux 2 - cargo lambda v1 Rust Function

Logs

No response

@Sandy-Garrido Sandy-Garrido added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 29, 2023
@jdisanti
Copy link
Contributor

You need to configure credentials. Unfortunately, the error message is really bad right now. We're working on a fix in #979.

@awslabs awslabs locked and limited conversation to collaborators Nov 29, 2023
@rcoh rcoh converted this issue into discussion #981 Nov 29, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants