Using AWS IoT Core for real-time notifications on the front-end app from the backend

Viewed 90

It's a multi-tenant application. Our users are assigned permissions based on the groups they are in. The addition/deletion of users to groups does not happen very often but we would ideally like to get real-time notifications.

If I were to consider IoT real-time messaging so that the client app will subscribe to IoT topics and the backend will push to IoT topic whenever a user gets added/deleted from a group,

  1. would it be a topic per tenant or a topic per group per tenant or a topic per user?

  2. Also, how would the cost add up in this case given the addition/deletions to the group won't be very often but considering this approach just so that the permissions reflect in the real-time?

What are the pros/cons of using this approach over maintaining a table in DynamoDB for storing data of recently update user permissions? The only problem with the DynamoDB approach for us is that we would like to cache the JWT auth token at the authorizer and we were considering returning the updates from DDB on pre token generation trigger which means a delay of 1-5 minutes due to caching

0 Answers
Related