S3 private files for multiple users
See original GitHub issueHi,
I do manage to store private files but only the owner can get these files (with Storage.vault(key)) with AWS Cognito authentication and verification (JWT).
How to get these files for multiple authorized users like for a chat application ?
I want that only members can get images :
type Conversation
@model(subscriptions: { level: public })
@auth(
rules: [
{ allow: owner, ownerField: "members" }
{ allow: groups, groups: ["admin"], operations: [read] }
]
) {
id: ID!
**members: [String!]!**
user: User @connection(name: "UserConversations")
messages: [Message] @connection(name: "ConversationMessages")
createdAt: String
updatedAt: String
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Controlling access to a bucket with user policies
This walkthrough explains how user permissions work with Amazon S3. In this example, you create a bucket with folders. You then create AWS...
Read more >Allow multiple users access to private S3 folder using IAM roles
I want to do the following: ... Everything I've found online revolves around each user having their own folder by creating an IAM...
Read more >Share Your AWS S3 Private Content With Others, Without ...
Amazon Web Services (AWS) S3 objects are private by default. Only the object owner has permission to access these objects.
Read more >Managing Private Files With AWS S3 | by Hernan Reyes
This solution is what I used when I migrated images. It basically consists in creating a backend endpoint that will validate if the...
Read more >Secure the files in your Amazon S3 bucket - AWS re:Post
By default, all S3 buckets are private and can be accessed only by users who are explicitly granted access. Restrict access to your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I finally use pre-signed URLs (with TTL). I put the URL in a private member of an Amplify object.
Hi @rudyhadoux
I think to access S3 private files in your chat application, you can give access to them via Presigned urls.
These are the steps that you can follow
With this url members user will be able to access private images in S3.
Let me know if this works or related to your question.