-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't force public/ and private/ prefixes for S3 keys #332
Comments
@ffxsam public and private prefixes are used mainly for notation around the permission level you decide i.e. Storage.configure( { level: 'private' } ). Also, the region actually isn't added by us, this is the Cognito Identity ID, so essentially the user ID, and it allows for a sort of multi tenancy among the private files, so think of it like /private/me/... kinda like a home directory type of thing. If we didn't use public/private prefixes, it may be difficult for the rest of the storage library to interact or enforce permissions. I'm no exactly sure how we would easily enforce permissions if we didn't use the prefix in S3, since S3 is object storage, the prefix allows us to easily enforce this permission. Let me know what you think. |
Ahh, I guess I'm not informed on what the bigger picture of this library will be and how all the pieces fit together. I was under the impression that Amplify is basically a high-level wrapper around Cognito and related services. Is there something else in the library that depends on S3 storage using the prefixes like that? |
Can you make the prefixes configurable? This would make life easier for existing projects. |
I think making them configurable would be a pretty simple thing here, @ffxsam would this help in your use case? |
Very much so, yes! I think locking people in to using |
Great, I'll add this to our backlog. |
@mlabieniec @ffxsam Hi guys, how can i save files in the root of the bucket? I don't need prefix at all. |
Found a way to do this,
This saves the file in the root of the bucket, inside folder "folderName". |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
There should be a way to not use the
public/
andprivate/<region>:<uuid>/
prefixes. This removes control from the developer.I'm also confused as to why the region is included in the path. Does it have some sort of effect on how data is stored in S3?
The text was updated successfully, but these errors were encountered: