How would I extend app to allow users to share their notes?

Hi All, I really loved this tutorial. I am wondering though, the next step for me would be to allow users to share their notes with each other. For instance, they could click on a notes ‘share’ button and give another user access to see that note. How would you go about designing this given the current app architecture? A few questions:

1.) Would it be reasonable to create another dynamo db table that has a list of all the users that a particular user has shared their todo’s with and then augment the todo list to have another section that also listed out those notes? Or would it make more sense to have a note allow multiple users for the userId field?

1.) How would this impact the IAM permissions so that it would allow one user to see the other users todos securely if they have been shared?


So would a note be shared with other logged in users?

If so, then it’s just a matter of having that note in the list of the notes for that shared user. Currently, you can only see the ones that you created. You can simply add to that. There is nothing IAM related here.

The uploads is a bit different. Currently, they are uploaded to a users “directory” in S3. You would need to change that.

@caseydawsonjordan were you able to figure this out? Interested as well

It’s a little tricky to answer the whole setup in a comment but we’ll be extending the guide to show how to do this.

Sorry to awaken a dead thread but I too want to accomplish this and I think I’m close. I have it so all users can see and click all notes. The problem is the GET method to see the note requires both the noteId and the userId to make the query, but in this scenario the passed in userId will NOT be the user who made the note. Is it safe to pass another user’s id as a query parameter, say?

Is the user id that you are passing around, the current authenticated user?

No, it would be the id of the user who made the note.

In that case maybe you don’t want to index the notes by user id? Just make it so that you fetch a note by only passing in the note id?

Hmm I’ll look into that. Admittedly I don’t know the first thing about Indexing, but how hard could it be? Thanks!

1 Like