Reputation: 41
For my Multi tenant Application I am creating Cognito user pools for each tenant with a special naming convention using Javascript SDK.
When adding a user in Cognito User Pool for a tenant, an email notification will be sent. I created a lambda function with a custom email message and configured it as a trigger in Custom Messages in Cognito User Pool. Ref: https://docs.amazonaws.cn/en_us/cognito/latest/developerguide/cognito-user-pool-settings-message-templates.html
Now my concern here is I need to prepare a link and logo by the tenant name, for that purpose I need to get the Cognito User Pool Name. From the Lambda function, I can get the pool Id.
Can anyone help, how to get the Cognito User Pool Name by pool Id or how to pass dynamic custom parameters to my lambda function when it is triggered by Cognito User Pool.??
Upvotes: 0
Views: 1275
Reputation: 1941
I am not familiar with JS but in python you can do it.
Follow this link. Of course it is possible in JS.
Upvotes: 1