# Servless Web Socket Plugin - Problem Deploying

**URL:** <https://forum.serverless.com/t/servless-web-socket-plugin-problem-deploying/7977>\
**Category:** Serverless Framework\
**Created:** [April 13, 2019, 12:47am UTC](https://forum.serverless.com/t/servless-web-socket-plugin-problem-deploying/7977 "2019-04-13T00:47:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stark506](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@stark506](https://forum.serverless.com/u/stark506)\
**Post date:** [April 13, 2019, 12:47am UTC](https://forum.serverless.com/t/servless-web-socket-plugin-problem-deploying/7977/1 "2019-04-13T00:47:42Z")

</div>

Hello all!

I am trying to deploy my new websocket api gateway. Following the documentation [here](https://serverless.com/framework/docs/providers/aws/events/websocket/), I have created a little hello world app.

However, when I try to deploy, I get the following error:

Serverless Error ---------------------------------------  
You need to set the “route” when using the websocket event.

If I change my functions to use the “route” param instead of “routeKey”, then I get this error:

Serverless Error ---------------------------------------

Missing required key ‘RouteKey’ in params

if I try a combination of the two, I can get deploy successfully, but the websocket does not register any connection attempt.

Has anyone seen this before?

Here is my serverless yaml for reference:

```
functions:
    connectionManagement:
        handler: connectionHandler.connectionHandler
        events:
            - websocket:
                  routeKey: $connect
            - websocket:
                  routeKey: $disconnect
    defaultMessage:
        handler: connectionHandler.defaultHandler
        events:
            - websocket:
                  routeKey: $default
    chatMessage:
        handler: messageHandler.sendMessage
        events:
            - websocket:
                  routeKey: message
```

---

<div class="post-metadata">

**Author:** ![moro](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/moro/32/4303_2.png) [@moro](https://forum.serverless.com/u/moro)\
**Post date:** [April 13, 2019, 6:17pm UTC](https://forum.serverless.com/t/servless-web-socket-plugin-problem-deploying/7977/2 "2019-04-13T18:17:22Z")

</div>

Hi, serverless natively supports websockets, you don’t need to use any plugins right now. Please take a look if you have a `serverless-websockets-plugin` remove it and use `route` instead of `routeKey` (plugin uses a routeKey param). Serverless version should be at least 1.38.0.

p.s. if it doesn’t help - please provide the whole `serverless.yml`
