aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Websocket Support for API Gateway

Open nicosuave opened this issue 6 years ago • 64 comments

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.

nicosuave avatar Dec 28 '18 02:12 nicosuave

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. 👍

abbottdev avatar Jan 29 '19 21:01 abbottdev

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?

redtopia avatar Feb 25 '19 06:02 redtopia

I'd love to see that as well.

alexandrecanuto avatar Mar 07 '19 21:03 alexandrecanuto

We'd love to see this supported in SAM asap.

kauphylover avatar Mar 29 '19 05:03 kauphylover

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 avatar Apr 05 '19 14:04 virtuoushub

@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 avatar Apr 05 '19 16:04 redtopia

@redtopia ah, I think you are correct. I have successfully packaged and deployed; but running locally I have not tested. Thanks for clarifying.

virtuoushub avatar Apr 08 '19 13:04 virtuoushub

That example is only for packaging and deploying. API Gateway websocket support for localhost is still lacking in SAM.

kellengreen avatar Jun 26 '19 23:06 kellengreen

I want this. XD

0num4 avatar Jul 11 '19 21:07 0num4

👍

timveletta avatar Sep 02 '19 09:09 timveletta

Please help asap.

anhdt-eas avatar Sep 17 '19 04:09 anhdt-eas

Would love to see this feature, because my application relies heavily on websockets. This would make the local development/testing much easier.

thomasrepnik avatar Oct 02 '19 14:10 thomasrepnik

My company would really benefit from the ability to do local websocket testing

goldsam avatar Oct 05 '19 14:10 goldsam

+1

We will need this for local development on our new application which may use web sockets. Please update soon

mike-tedford avatar Oct 14 '19 18:10 mike-tedford

+1 Any progress on this proposal?

ghost avatar Dec 19 '19 06:12 ghost

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.

agarbutt avatar Jan 14 '20 19:01 agarbutt

any progress ?

592da avatar Jan 21 '20 07:01 592da

Can we get an update here?

abbottdev avatar Jan 31 '20 14:01 abbottdev

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

v-y-a-s avatar Feb 12 '20 13:02 v-y-a-s

Following. Would really be ideal to have this feature in SAM...

djdenv avatar Mar 01 '20 22:03 djdenv

Any update on this?

MatteoGioioso avatar Apr 05 '20 08:04 MatteoGioioso

+1 Following for an update

elembie avatar Apr 11 '20 01:04 elembie

+1 - would like to see when released.

mwalker638 avatar May 07 '20 20:05 mwalker638

+1 I hope this is implemented soon. My use case is end-to-end testing of asynchronous application

barmag avatar May 31 '20 12:05 barmag

+1 Please add this feature

JohnRudolfLewis avatar Jun 27 '20 17:06 JohnRudolfLewis

+1 this feature would be extremely useful.

danballance avatar Jun 27 '20 22:06 danballance

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..

misk0 avatar Jul 06 '20 14:07 misk0

+1 Following.

heretogo avatar Jul 09 '20 15:07 heretogo

+1 Also need this.

jduffy7 avatar Jul 23 '20 21:07 jduffy7

@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.

danballance avatar Aug 03 '20 11:08 danballance