使用API​​ Gateway Websockets的簡單應用程序|無伺服器



在此視頻中,我們將看到如何使用新的API Gateway Websockets和Serverless Framework做一個簡單的應用程序

★★自述文件/對我開放★★

⭐訂閱此頻道:http://bit.ly/foobar-youtube
⭐分享此視頻:https://youtu.be/Quk_XHMvFJI

☆☆關於本視頻☆☆

在本視頻中,我們將看到如何使用新的API Gateway Websockets和Serverless Framework做一個簡單的應用程序。
觀看視頻,直到最後,了解如何將其與最新版本的Serverless Framework結合使用!

?無伺服器框架插件(不建議使用):https://github.com/serverless/serverless-websockets-plugin
GatewayAPI網關管理API的文檔:https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ApiGatewayManagementApi.html
GiGithub中的代碼:https://github.com/mavi888/websockets-chat
less無伺服器框架1.38.0的發行說明:https://serverless.com/blog/framework-release-v138-websockets/
 
該視頻中提到的視頻:
less無伺服器101入門:https://www.youtube.com/playlist?list = PLGyRwGktEFqedFrqKLIzmUXlsiQ4tbdyo
?無伺服器插件播放列表:https://www.youtube.com/playlist?list=PLGyRwGktEFqcVoQkgq3vE1GeN3oY39btv
variables環境變數:https://www.youtube.com/watch?v = pMpPkNpy14A&index = 4&list = PLGyRwGktEFqe3-M1EfbpRX_syICmytNWx&t = 0s

☆☆跟我在線☆☆

?推特:https://twitter.com/mavi888uy
?Instagram的:foobar_codes
my我所有的無伺服器課程:bit.ly/2oSX8rv

?Patreon-支持我的頻道:https://www.patreon.com/foobar_codes

更多信息-http://marciavillalba.com

☆☆關於FOOBAR☆☆
在這個頻道中,您可以找到大部分與雲和無伺服器相關的編碼教程。
另外,我也喜歡談論架構,軟體設計,動機和領導能力。
每個星期二都有一個新的視頻,請繼續關注:)

☆☆贊助☆☆
貴公司是否要贊助視頻?通過推特或電子郵件與我聯繫(關於頁面中的電子郵件地址)

Patreon-支持我的頻道:https://www.patreon.com/foobar_codes

…..
感謝加布里埃爾·瑪麗(Gabrielle Marie)為我的介紹❤️提供的可愛資源(請在此處查看她的頻道:https://www.youtube.com/user/GlamSolutions)。

20 comments
  1. What about the lambda pricing? if a lambda its triggered in every client's message sent, wouldn't it be expensive? assumingly an app in a very large scale…

  2. Hola , de casualidad no tendrás un curso en udemy con websokets y serverless ya que tengo el tuyo pero no cuenta con esta característica

  3. Hi, thanks for the great tutorial!! Idle time(10min) and max connection(2hr) still an issue for realtime application. What would be the best way to handle this for a real-time application to make sure all client is always connected when server need to send message? Heartbeat?

  4. Hola! Marcia, a mi me manda el error "error: Unexpected server response: 502" desde wscat, desde una pagina web. Hice todo manual desde la consola, implemente la api y la probe me sigue marcando 502. Te suena el error? que crees que pueda ser? El log dice: 2019-06-14 13:55:05.513 (-05:00) undefined ERROR Uncaught Exception {"errorType":"ReferenceError","errorMessage":"event is not defined","stack":["ReferenceError: event is not defined"," at Object.<anonymous> (/var/task/handler.js:13:12)"," at Module._compile (internal/modules/cjs/loader.js:701:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)"," at Module.load (internal/modules/cjs/loader.js:600:32)"," at tryModuleLoad (internal/modules/cjs/loader.js:539:12)"," at Function.Module._load (internal/modules/cjs/loader.js:531:3)"," at Module.require (internal/modules/cjs/loader.js:637:17)"," at require (internal/modules/cjs/helpers.js:22:18)"," at _tryRequire (/var/runtime/UserFunction.js:75:12)"," at _loadUserApp (/var/runtime/UserFunction.js:95:12)"]}

  5. I'm having a very difficult time trying to find good examples/tutorials of using API Gateway Websockets with Cognito (bonus for Serverless framework + Cloudformation)…

  6. Why after changes of yml file, at the end, i dont get endpoint anymore, it response with 'endpoints: none' ?
    I suggest to do some debug-setup tutorial with RDS/mySql db, beacuse its little confusing and 99% of using these services is all about do proper config and setup.
    Good tutorial! 🙂 Thumb up!

  7. a very good tutorial.
    i would like to know how api websockets work with a service like athena or ECS task could you please help me. that will great.
    Thanks you,
    Vamse.

  8. Hello , This was a really helpful video. I really need your help to make a chat application whose frontend I have already designed using Angular 6 and Need a AWS websocket api gateway to enable multiple users to chat. However I fall out of resources to learn. I shall be very thankful if you can demonstrate how to connect this API gateway to frontend and begin chatting. That video would be something "on demand". 🙂

  9. Hi thanks for this great article. Can we use single serverless.yml which can deploy both http and websocket API together and want to specify deployment role in each function.

Comments are closed.