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