Infra/AWS

Announcing WebSocket APIs in Amazon API Gateway

하우아유두잉 2019. 8. 27. 16:41

 

아래의 serverless websocket 튜토리얼을 진행하는데

https://codeburst.io/how-to-build-a-react-chat-app-with-aws-api-gateway-websockets-and-cognito-custom-authorizer-6f84f2da47ec

 

How to build a React chat app with AWS API Gateway WebSockets, Custom Lambda Authorizer

AWS announced the launch of a widely-requested feature: WebSockets for Amazon API Gateway few days ago…

codeburst.io

aws에서 제공하는 기본 예제를 선행학습으로 해야해서

기록에 남긴다.

 


 

 

AWS API Gateway에서 websocket 제공

공식문서

https://aws.amazon.com/ko/blogs/compute/announcing-websocket-apis-in-amazon-api-gateway/?source=post_page-----6f84f2da47ec----------------------

 

Announcing WebSocket APIs in Amazon API Gateway | Amazon Web Services

This post is courtesy of Diego Magalhaes, AWS Senior Solutions Architect – World Wide Public Sector-Canada & JT Thompson, AWS Principal Software Development Engineer – Amazon API Gateway Starting today, you can build bidirectional communication application

aws.amazon.com

 

예제 소스 Github

https://github.com/aws-samples/simple-websockets-chat-app

 

 

aws-samples/simple-websockets-chat-app

This SAM application provides the Lambda functions, DynamoDB table, and roles to allow you to build a simple chat application based on API Gateway's new WebSocket-based API feature. - aws-samp...

github.com

 

 

 

먼저 Github에서 예제소스를  clone 한다.

 

그런 후 S3에 적당한 버킷을 만들고

아래 명령어를 실행해 프로젝트를 배포해본다.

 

S3

CloudFormation

Lambda

 

마지막 명령어 실행 결과이다.

 

API Gateway

 

 

 

실행 테스트