Skip to content
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

Websocket Support for API Gateway #896

Closed
nicosuave opened this issue Dec 28, 2018 · 72 comments
Closed

Websocket Support for API Gateway #896

nicosuave opened this issue Dec 28, 2018 · 72 comments
Labels
area/local/start-api sam local start-api command maintainer/need-followup type/feature Feature request
Milestone

Comments

@nicosuave
Copy link

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.

@jfuss jfuss added type/feature Feature request area/local/start-api sam local start-api command labels Jan 8, 2019
@dhruvsood dhruvsood added this to the Backlog milestone Jan 18, 2019
@abbottdev
Copy link

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

@redtopia
Copy link

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?

@alexandrecanuto
Copy link

I'd love to see that as well.

@kauphylover
Copy link

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

@redtopia
Copy link

redtopia commented Apr 5, 2019

@virtuoushub I'm not 100% sure, but I think that can only be packaged and deployed using the sam cli, but not actually run.

@virtuoushub
Copy link

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

@kellengreen
Copy link

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

@0num4
Copy link

0num4 commented Jul 11, 2019

I want this. XD

@timveletta
Copy link

👍

@anhdt-eas
Copy link

Please help asap.

@thomasrepnik
Copy link

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

@goldsam
Copy link

goldsam commented Oct 5, 2019

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

@mike-tedford
Copy link

mike-tedford commented Oct 14, 2019

+1

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

@ghost
Copy link

ghost commented Dec 19, 2019

+1
Any progress on this proposal?

@agarbutt
Copy link

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.

@592da
Copy link

592da commented Jan 21, 2020

any progress ?

@abbottdev
Copy link

Can we get an update here?

@v-y-a-s
Copy link

v-y-a-s commented Feb 12, 2020

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

@djdenv
Copy link

djdenv commented Mar 1, 2020

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

@MatteoGioioso
Copy link

Any update on this?

@elembie
Copy link

elembie commented Apr 11, 2020

+1 Following for an update

@mwalker638
Copy link

+1 - would like to see when released.

@barmag
Copy link

barmag commented May 31, 2020

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

@JohnRudolfLewis
Copy link

+1 Please add this feature

@danballance
Copy link

+1 this feature would be extremely useful.

@spankyed
Copy link

+1 Idek what sam is but I need my websockets local. Thanks.

@praneetap
Copy link
Contributor

Thanks for sending this pull request. We are hesitant to merge this today because with the current resources we would not be able to commit to maintaining this feature in the long run - maintain feature parity and fix issues with the implementation in a timely manner. Given the reaction we can see that this is important to the community and we recommend one of the two alternatives -

  1. We highly recommend you to use SAM Accelerate to test this in your development environment in the cloud. Here is a helpful video to learn more about it, and here is the installation instructions for the beta version. Please let us know if this helps with your testing needs.
  2. If testing in the cloud is not an option for you, we are considering adding plugin support if there is enough interest. Upvote and comment on this tracking issue, if building this as a plugin would be something you would be interested in instead.

@theimowski
Copy link

FWIW I tried to run SAM Accelerate with the sample WS API Gateway provided by AWS team, but it failed. Details here: #3459

@lfbertucci
Copy link

+1 Following

@seanieb
Copy link

seanieb commented Jan 10, 2022

I honestly can't believe that AWS would ship WebSockets for a API gateway and have not support local development. It's tacitly saying that if you want to use AWS you'll need to have individual Accounts for development. The cost and speed implications for such a policy will result in AWS's loss of developers.

@tim-koehler
Copy link

Is there still no official or unofficial solution for local development!?

@netleafdev
Copy link

Is there still no official or unofficial solution for local development!?

Perhaps it's because they insist on hiring only people who can pass their cringe requirements for leetcode that require a month or more of full-time studying only students or recent grads have time for, covering questions which have almost no usefulness in real-world scenarios that aren't easy to google the solution for. And, after working there for a year or two, those same people leave for more lucrative positions that also have this requirement. Before they even reach a senior level tenure for most of us, they already have enough cash to retire. It leaves the most experienced people to just stop applying after a while, hence the large number of open senior/leadership positions across FAANG, half of which are labeled urgent yet remain there for months.

Solution? Have a leetcode OR seniority/experience + project assignment & presentation/defense instead. If I were a hiring manager there, I'd hire on the spot anyone who can successfully implement this issue. Will that happen? No. So let's buckle up to be ignored.

@praneetap
Copy link
Contributor

FWIW I tried to run SAM Accelerate with the sample WS API Gateway provided by AWS team, but it failed. Details here: #3459

@theimowski This should be fixed. Please let us know if you have any more feedback for us on Accelerate!

@boblund
Copy link

boblund commented Aug 12, 2022

I've recently created a github repo that I use to locally test my AWS websocket work. It also supports local testing of S3 static websites and apis served by API Gateway.

@jfuss
Copy link
Contributor

jfuss commented Dec 20, 2022

Thank you for the interest. To support this today in cloud, you can use sam sync. We are still exploring a Plugin based solution for local development to allow the community to enable/extend features like this. Give that, we are closing this in favor of the Plugins tracking issue: #3265

@jfuss jfuss closed this as completed Dec 20, 2022
@jfuss jfuss removed the stage/pm-review Waiting for review by our Product Manager, please don't work on this yet label Dec 20, 2022
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@heaven-born
Copy link

why close this ticket in favor of the Plugins tracking issue if the Plugins don't solve the issue automatically? There must be someone who will create the plugin at least.

SAM Accelerate doesn't solve the issue for all cases either, so this ticket is basically closed with no resolution.

@goldsam
Copy link

goldsam commented Sep 4, 2023

I've been waiting over three years! REOPEN THIS TICKET!

@redtopia
Copy link

redtopia commented Sep 5, 2023

@jfuss it seems that there is interest in making this feature available. I can tell you that the ONLY reason why I am not using websockets on AWS is because I have no way to get them to work in local development environments.

@satokenta940
Copy link

Is it currently stagnant? I think it is necessary to support Websocket.

@goldsam
Copy link

goldsam commented Jan 3, 2024

Hey AWS - Perhaps you haven't noticed, but Azure has been gaining a lot of ground on you lately. Perhaps this is in part due to their robust tooling offerings? 😮

@brazilianbytes
Copy link

Hi everyone,

Late this month, I came here to confirm this lack of feature, but I tried to make this work until SAM fixed the issue. Please check my guide: https://medium.com/solutions-architect-rocks/java-websockets-powered-by-aws-lambda-8cd974024030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/local/start-api sam local start-api command maintainer/need-followup type/feature Feature request
Projects
None yet
Development

No branches or pull requests