-
Notifications
You must be signed in to change notification settings - Fork 292
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
StorageBrowser RFC #5731
Comments
looks awesome. I'm now desperate to see examples of validation / feedback of the upload. for example, after uploading a CSV, a table listing the rows, together with valid/invalid. |
Very nice, would be even more awesome if a simple search functionality based on s3 prefixes were added. |
Great feature, very impressed
Looking forward to the release! |
Just set up the Storage Browser in my environment, and I'm loving it! a couple of questions:
|
Awesome package, can this use cdn(cloudfront) for file browsing and downloading and keep the bucket read access only on cdn and do we have multi bucket support |
Hello @reesscot , Great feature! Could you please provide an approximate target date for the release of the production-ready version? |
Really nice RFC 👍 Looking forward to it! Feature Request:
|
Nice, looks super exciting
Thanks :) |
AWS S3 SDK provides an "endpoint" parameter, can we configure that with this new UI browser ?
|
Need some help guys, not able to run it :(
Usage
amplify/storage/resource.ts
What I am missing ? What I am doing wrong ? Getting this error always when attempting to build/run the project :(
Is this an error with
|
@reesscot , do you have somewhere published a working version/project/template of this RFC please ? |
@scorobogaci It looks like you're getting the wrong versions of the dependencies somehow, can you try forcing the storage-browser version of the
Alternatively, you could try this example repo which we've been testing with on Next.js: https://github.com/reesscot/nextjs-storage-browser |
@tttol @scorobogaci In regards to the styling questions, can you tell me what order you are imported the CSS in? Also, do you have any other CSS styling that might be conflicting in your app? |
Perfect, thanks a lot @reesscot , explicitly adding |
thanks for the hint @reesscot . I have imported the styles in the component directly Final simple component looks like this and works fine 👍
|
@reesscot import "@aws-amplify/ui-react-storage/storage-browser-styles.css";
import "@aws-amplify/ui-react/styles.css"; However, the box displaying the list of objects in the bucket feels a bit narrow. Is this the intended behavior? This is my repository that I tried StorageBrowser. |
Hi @tttol,
|
This looks great! Just to add to the feature requests:
|
This is a great announcement. Thank you team for bringing this feature to the community. |
This looks cool. If I do a rename or copy from folder to folder in the same bucket, will it execute in-cloud or on-client? Is there a "bucket to bucket" option that can happen on the origin versus on the user client? |
why would we need this ? This package contains the AWS Amplify Storage category and is intended for internal use only. To integrate Amplify into your app, please use aws-amplify. Why explicitly adding it ? Can you provide a sample please of this RFC working with https://docs.amplify.aws/react/start/quickstart/ please ? It's almost unmanageable... this tag |
@scorobogaci I'm making this suggestion because it forces the correct internal version of the @aws-amplify/storage package. You need all the Amplify JS packages to be using the This sample version is using Gen2 https://github.com/timngyn/nextjs-storage-browser/tree/main In order to debug the "Amplify Storage configuration not found issue" mentioned above, can you please share the contents of your |
Sample is not reachable, 404 |
@scorobogaci Sorry about that, I just made this example repo and was able to get it running and deployed to Amplify Hosting. |
@reesscot , I see you've edited a bit the setup by adding
explicitly Man, can you please review this setup and this tag/RFC so that is work with other components of the Amplify please ? It is becoming a nightmare already |
@scorobogaci Can you please try out the example repo app? The What issues are you having with deploying changes? When I've had issues with deploying changes to the storage definitions, it's usually been a missing command in the amplify.yml file. Specifically check to make sure you have this line: https://github.com/reesscot/nextjs-storage-browser/blob/main/amplify.yml#L7 |
Alright mate, the issue is ... once you add the package
won't be added to |
ignore this please, I forgot to add |
|
@reesscot Thanks for all the support. I have a doubt, is it possible to use this component to build an app that serves the purpose of an S3 browser where users can access multiple buckets based on their access. |
Yes, you can use S3 Access Grants to create grants for users and groups. The component will list those buckets or prefixes as locations and the user will be able to navigate them. |
Overview
StorageBrowser
for Amazon S3 is an open source Amplify UI React component customers can add to their web applications to provide end-users with a simple interface for data stored in Amazon S3. Using StorageBrowser for S3, customers provide authorized end-users access to easily browse, download, and upload data in Amazon S3 from their own applications. StorageBrowser for S3 only displays the data that your end-users are authorized to access and automatically optimizes requests to deliver high throughput data transfer. You can control access to your data based on your end-user’s identity using AWS security and identity services or your own managed services.StorageBrowser for S3 is currently in developer preview while we collect your feedback before making the component generally available. The API might change while in developer preview so we do not recommend using it in production until it is generally available. We will post updates to this RFC as we make changes to the component.
StorageBrowser for S3 has 3 main views:
1 Installation #
Fork the example repo:
https://github.com/reesscot/nextjs-storage-browser
OR:
You can install StorageBrowser for S3 from tagged versions of the @aws-amplify/ui-react-storage and aws-amplify packages. Add these dependencies to your package.json file:
Or add them via
npm
:We will publish StorageBrowser for S3 to the latest version of these packages once it is generally available.
2 Setting up authentication and authorization #
In order to show S3 locations and their contents to end users, you first need to set up your preferred authentication and authorization methods. There are 3 ways you can set up authentication/authorization with the storage browser component:
Amplify auth
Make sure you have an Amplify project started, by following the getting started guides: https://docs.amplify.aws/react/start/quickstart/. Then create an S3 bucket with access rules by defining a storage resource and adding authorization rules https://docs.amplify.aws/react/build-a-backend/storage/authorization/:
In your frontend code, create the
StorageBrowser
component with the Amplify Auth adapter:Or if you want to use Amplify Auth with prebuilt Amplify UI you can just import the default
StorageBrowser
component and render it:AWS Identity Center and S3 Access Grants
For detailed setup instructions see this blog post: https://aws.amazon.com/blogs/storage/how-to-develop-a-user-facing-data-application-with-iam-identity-center-and-s3-access-grants/
Once you have IAM Identity Center and S3 Access Grants set up, in your React application you can use
createManagedAuthAdapter
to set up the auth rules andcreateStorageBrowser
to create theStorageBrowser
component:Go to step 3
Custom authentication and authorization
You can also use StorageBrowser for S3 with your own authentication and authorization setup. Rather than calling
createManagedAuthAdapter
orcreateAmplifyAuthAdapter
you can directly configure how StorageBrowser for S3 lists S3 locations and gets credentials for each location:3 Rendering the StorageBrowser #
Now that you have created the
StorageBrowser
component using one of the 3 auth methods above, you can place the component into your app:4 Customizing the StorageBrowser #
Composing
StorageBrowser for S3 has 3 main views that can be composed into your application if you want to move around parts of the component:
LocationsView
: initial screen showing a table with all S3 locations a user has access toLocationDetailView
: file browsing view once the user has selected an S3 locationLocationActionView
: view rendered when the user initiates an action like uploading filesFor example, to display the
LocationsView
(locations table) side-by-side with theLocationDetailView
(file browser table) with theLocationActionView
in a dialog:Using a custom UI
createStorageBrowser
improves bundle size by shipping without Amplify UI React Primitives, rendering basic HTML elements by default with only layout styling applied.You can control all of the elements used in the
StorageBrowser
component by passing in elements to thecreateStorageBrowser
function. Elements have a variant prop that is used to signify where that element is being used within the component tree of theStorageBrowser
. For example, theButton
element is used in many different places in theStorageBrowser
UI,variant
allows you control over how your button looks and behaves in different usage scenarios:Here are all the elements that you can override:
Feedback for dev preview #
We are looking for any and all feedback on StorageBrowser for S3. We would love to hear from you about bugs, aspects about the developer experience and APIs that could be improved, additional features and functionality you need, and more. We plan on addressing all of your feedback as it comes in.
Thank you to everyone that made this launch possible: @dbanksdesign @reesscot @calebpollman @timngyn @esauerbo @hbuchel @AllanZhengYP @jimblanc @ashwinkumar6 @Jordan-Nelson @haverchuck
The text was updated successfully, but these errors were encountered: