#React native pre-sign-up lambda access to owner based table

5 messages · Page 1 of 1 (latest)

terse lily
#

I've been following the guide to add a pre-sign-up lambda trigger, and I want my function to update an owner based authorized table on my GraphQL API. How should I approach this? I've been getting an unauthorized errors from my lambda function when trying to do so.
Thanks!

Guide link: https://dev.to/codebeast/how-to-create-a-record-in-dynamodb-when-a-user-signs-up-34e2

DEV Community

To successfully authenticate a user, it means that you have securely stored their credentials on your...

dreamy prawn
#

Hey @terse lily , if the Lambda function was provided access to the GraphQL API and you are seeing this error. The problem may be with the VTL template resolvers not getting updated. To mitigate the issue could you try either adding a empty line in the schema.graphql file which should trigger an update on the API status then running amplify push or run amplify push --force which which push the project.

terse lily
#

@dreamy prawn thank you for helping!
In the meantime I tried a completely different approach, avoiding the lambda altogether. So if I get back to this I'll try and will update for sure 🙂

sharp hawk
#

@terse lily Did you figured it out how to do this? I have the same struggle

terse lily
#

@sharp hawk unfortunately no, I figured I should just to it from the app context where the current user is available easily