You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Important: Please include a complete minimal code example that we
can paste as/is into a REPL, execute, and watch fail.
I am using AWS Lambda functions to connect to a Websocket API. Here is the text from the AWS Technical support case:
I did some research and to replicate the issue I followed the below steps:
I created a WebSocket API and integrated a Lambda Function with the ‘$connect’ method, which printed the connectionId. I obtained connectionId from CloudWatch logs.
Then I started a connection using wscat utility as below :
$ wscat -c wss://someapi.execute-api.ap-south-1.amazonaws.com/production
Connected (press CTRL+C to quit)
Made a GET request to the the connection URL to get the status of the connectionId. I used ‘awscurl’ utility to test this as below:
$ awscurl --service execute-api -X GET https://someapi.execute-api.ap-south-1.amazonaws.com/production/@connections/KSIqme0vBcwCG-g=
I got response in below format for this request:
{
{
"identity" : {
"sourceIp" : "X.X.X.X",
"userAgent" : null
},
"connectedAt" : "2021-12-13T10:33:26.844Z",
"lastActiveAt" : "2021-12-13T10:33:26.844Z"
}
However, when I removed the ‘connectionId’ from the end of URL used above and made the request
$ awscurl --service execute-api -X GET https://someapi.execute-api.ap-south-1.amazonaws.com/production/@connections/
I received same error as yours i.e.
{"message":"No method found matching route @connections/ for http method GET."}
To summarize, the URL needs to have connectionId at the end in order to check status of that specific connectionId using GET request.
Dependencies
Description with failing test case
I have defined
Important: Please include a complete minimal code example that we
can paste as/is into a REPL, execute, and watch fail.
I am using AWS Lambda functions to connect to a Websocket API. Here is the text from the AWS Technical support case:
I did some research and to replicate the issue I followed the below steps:
I created a WebSocket API and integrated a Lambda Function with the ‘$connect’ method, which printed the connectionId. I obtained connectionId from CloudWatch logs.
Then I started a connection using wscat utility as below :
$ wscat -c wss://someapi.execute-api.ap-south-1.amazonaws.com/production
Connected (press CTRL+C to quit)
Made a GET request to the the connection URL to get the status of the connectionId. I used ‘awscurl’ utility to test this as below:
$ awscurl --service execute-api -X GET https://someapi.execute-api.ap-south-1.amazonaws.com/production/@connections/KSIqme0vBcwCG-g=
I got response in below format for this request:
{
{
"identity" : {
"sourceIp" : "X.X.X.X",
"userAgent" : null
},
"connectedAt" : "2021-12-13T10:33:26.844Z",
"lastActiveAt" : "2021-12-13T10:33:26.844Z"
}
However, when I removed the ‘connectionId’ from the end of URL used above and made the request
$ awscurl --service execute-api -X GET https://someapi.execute-api.ap-south-1.amazonaws.com/production/@connections/
I received same error as yours i.e.
{"message":"No method found matching route @connections/ for http method GET."}
To summarize, the URL needs to have connectionId at the end in order to check status of that specific connectionId using GET request.
The
:GetConnection
invocation is:where. connection-id is a valid ConnectionId taken from the Lambda input.
The text was updated successfully, but these errors were encountered: