Using React, AWS, Graphql, Dynamodb, how can I allow a user to share a link which will allow anyone who clicks on that link to view that user’s data?

Using React, AWS, Graphql, Dynamodb, how can I allow a user to share a link which will allow anyone who clicks on that link to view that user’s data?


0

I am new to AWS so any help will be appreciated!

In many applications I see a feature which allows a logged in user to generate a shareable link which when clicked by anyone would display the user’s data.

I was able to create unique links using the cognito user ID of a logged in user, for unauth access I created a AWS_IAM role. However, I am unable to fetch the data.

It just returns an empty string. Just for additional information, I am using the index in dynamodb to implement fine grained access control.

        try {
            const starsData = await API.graphql({
              query: getNode,
              authMode: 'AWS_IAM',
          });

Share
Improve this question

New contributor

Dr-Hades is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1 Answer
1

Reset to default


0

You would need to push the data to S3 and share a pre-signed URL:

https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html

Share

AWS Employee



Leave a Reply

Your email address will not be published. Required fields are marked *