Reputation: 4941
We have a "shared" layer that has a few resources accessed by different services in the project. There is a table storing shared information (user permission on each of the resources in the project, since it can get big so not being stored in JWT token)
Should we have a Lamba read the dynamoDB table and give other microservices access to the shared lambda only or should we give the microservices access to the table directly so that they can just use a lib method to read the permissions from the table? I am leaning towards direct DynamoDB table access since that avoids the extra hoop through a lambda.
Upvotes: 1
Views: 315
Reputation: 10185
Both approaches have advantages & disadvantages:
Direct Access to DynamoDB - Good Sides
Direct Access to DynamoDB - Bad sides
Mediating Lambda - Good Sides
Mediating Lambda - Bad Sides
Upvotes: 1