What I do is simply fetch the data from Cognito when needed.
So in your case, first fetch the Vehicle in DynamoDB, then fetch the user data, e.g. using adminGetUser (though that for some obscure reason does not support user id/sub, only username and alias, so listUsers with a filter for "sub" might be better).
I was about to suggest that you could use Lambda triggers if you really needed to store the attributes in DDB, but it seems there is no Lambda trigger for attribute updates, which is quite odd, but I guess you could get around that by only letting users update attributes through your backend, which could then do the DDB update as well.
Thank you very much for your reply!
Yeah, I just add a Lambda trigger to save User info into DDB after they confirm signup. Then everything will be handled on backend and DDB.
Relevant content
- asked 3 years ago
- asked 7 months ago
- asked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 months ago