0

I want to send a websockets notification from lambda function to clients, on a website hosted via s3 origin with cloudfront.

Could someone help me with this, please? Thanks.

shearn89
  • 3,143
  • 2
  • 14
  • 39
NaNa
  • 3
  • 1
  • Can you clarify what problem you're trying to solve? Your question is a little unclear to me. – shearn89 Feb 01 '22 at 11:03
  • when a record in a table in database update, i want to send push notification to client site. My frontend is uploaded on s3 and used cloudfornt distribution and my backend is lambda. I use aws rds for database. Thanks – NaNa Feb 01 '22 at 11:11
  • You need to look at websockets. Here's an example: https://github.com/aws-samples/simple-websockets-chat-app You'll need to look at how to use CloudFront with multiple origins to route the requests to the Lambda. – shearn89 Feb 01 '22 at 11:13
  • @shearn89 Thanks for your kind help and I really appreciate it. – NaNa Feb 01 '22 at 11:16

1 Answers1

0

You need to look at websockets. Here's an example: github.com/aws-samples/simple-websockets-chat-app You'll need to look at how to use CloudFront with multiple origins to route the requests to the Lambda.

shearn89
  • 3,143
  • 2
  • 14
  • 39