aws-sam-cli
aws-sam-cli copied to clipboard
Websocket Support for API Gateway
Describe your idea/feature/enhancement
As per the announcement of WebSocket support in API Gateway, adding WebSocket support to SAM would facilitate local development.
Proposal
Add WebSocket support to API Gateway functionality.
This may be entirely out of scope of the SAM project, but came to mind when initially exploring API Gateway with WebSocket support.
I think this would be extremely useful, if you're using the websocket endpoints as a consumer and not http then you're not testing what you're deploying. 👍
I just started researching API Gateway Websockets and was about to dive into some test code. I was planning to do some testing using HTTP endpoints, but now I'm wondering if this is even possible. Any ideas?
I'd love to see that as well.
We'd love to see this supported in SAM asap.
It looks like it is? https://github.com/aws-samples/simple-websockets-chat-app
See:
- https://github.com/aws-samples/simple-websockets-chat-app#aws-cli-commands
- https://github.com/aws-samples/simple-websockets-chat-app/blob/master/template.yaml#L20-L25
@virtuoushub I'm not 100% sure, but I think that can only be packaged and deployed using the sam cli, but not actually run.
@redtopia ah, I think you are correct. I have successfully packaged and deployed; but running locally I have not tested. Thanks for clarifying.
That example is only for packaging and deploying. API Gateway websocket support for localhost is still lacking in SAM.
I want this. XD
👍
Please help asap.
Would love to see this feature, because my application relies heavily on websockets. This would make the local development/testing much easier.
My company would really benefit from the ability to do local websocket testing
+1
We will need this for local development on our new application which may use web sockets. Please update soon
+1 Any progress on this proposal?
This continues to be a big gap in this tooling. Yes, it seems that engineers can make do by creating a test
stage. However, it really makes testing a bit more of a challenge, as developers, need to deploy their stacks to an account prior to testing. I would prefer to leverage a continuous build, test, integrate, deploy pipeline to keep my feedback cycles short and quick. The lack of support within the sam
tool to execute a lambda function via a wss://
or ws://
local endpoint is prohibitive.
any progress ?
Can we get an update here?
I think this would really help. Also, there is no way to test custom authorizer locally.
connect: handler: handler.connect events: - websocket: route: $connect # authorizers are only for connect routes authorizer: name: auth identitySource: - 'route.request.header.Auth'
Having the auth function deployed, the checks do happen, but there is now way to test it locally as such. Took me a while to figure this out.
Another main issue, not having any means to hot reload as code is being changed. This really hurts
Following. Would really be ideal to have this feature in SAM...
Any update on this?
+1 Following for an update
+1 - would like to see when released.
+1 I hope this is implemented soon. My use case is end-to-end testing of asynchronous application
+1 Please add this feature
+1 this feature would be extremely useful.
I'm willing to help to develop this part but I don't think I can do it by myself. If anyone else is willing to help maybe we can do something..
+1 Following.
+1 Also need this.
@misk0 I would also be willing to help although it could only be in a supporting role. I don't understand enough about how the local services are set up to be able to do this work independently.