- Newest
- Most votes
- Most comments
There is not a lot of information in your question, but based on what you provided I see here two options.
- Use tenant_id as one of the attributes in dynamo table. Depends on your use-case , you may decided (or may not) to use it as Secondary Index.
- If you traffic goes through API Gateway you can attach the API key to the request from the client. More information can be found https://aws.amazon.com/blogs/compute/managing-multi-tenant-apis-using-amazon-api-gateway/
Amplify not supporting multi tenancy but there are couple of methods to achieve multi tenancy in Amplify App. You may check the feature request Support multi-tenant.
We could use Cognito user pool groups and when user created through Amplify Auth we can add user to specific Cognito User Pool groups of tenant. To implement this you can refer Amplify CLI enables creating Amazon Cognito User Pool Groups, configuring fine-grained permissions on groups, and adding user management capabilities to applications and define AppSync schema Auth rules as per user group data access. For more information on Groups based data access configuration you may refer user-group-based-data-access
Additionally, you may refer third-party blogs An updated guide on simple multitenant architecture using AWS Amplify and React Native Expo and Multi-Tenant AWS Amplify.
In summary, there isn't any ideal way to implement this in Amplify and I hope the above information was helpful to you.
Relevant content
- asked 2 years ago
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago
- How do I troubleshoot an increase in the TargetResponseTime metric for an Application Load Balancer?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago