question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for multiple buckets?

See original GitHub issue

In the documentation examples:

Amplify.configure(
    Auth: {
        identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab', //REQUIRED - Amazon Cognito Identity Pool ID
        region: 'XX-XXXX-X', // REQUIRED - Amazon Cognito Region
        userPoolId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito User Pool ID
        userPoolWebClientId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito Web Client ID
    },
    Storage: {
        bucket: '', //REQUIRED -  Amazon S3 bucket
        region: 'XX-XXXX-X', //OPTIONAL -  Amazon service region
    });

What if the web app needs to interact with more than one bucket? It would be nice to have a system where we could specify several and interact with them via their names.

    Storage: {
      bucketOne: {
        bucket: '', //REQUIRED -  Amazon S3 bucket
        region: 'XX-XXXX-X', //OPTIONAL -  Amazon service region
      },
      bucketTwo: { ... }
    });

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:64
  • Comments:31 (3 by maintainers)

github_iconTop GitHub Comments

16reactions
tim-thompsoncommented, Jul 5, 2018

Don’t know what the progress on this has been but as it is still open thought I would comment. I had this same restriction today and after some digging found that it is possible to pass a bucket option into various calls as follows:

Storage.vault.get(key, {bucket: 'alternative-bucket-name'});

Using this I’ve managed to successfully use multiple buckets in the same app. If it is not specified then it defaults back to the bucket in the global configuration for Amplify.

10reactions
aelboklcommented, Aug 4, 2020

I am just commenting to keep the bot from killing this thread. This feature is much needed and has many use cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New – Amazon S3 Replication Adds Support for Multiple ...
Amazon S3 Replication now gives you the ability to replicate data from one source bucket to multiple destination buckets. With S3 Replication ( ......
Read more >
How to use s3 life cycle policy for multiple buckets those ...
I have multiple buckets those stating with name dataplatform-raw , I wanted to apply life cycle policy to transition the data to s3...
Read more >
Using Multiple Buckets AWS Amplify - Medium
Using Multiple Buckets AWS Amplify ... From the Amplify documentation, we can consider that AWS Amplify is a development platform for building ...
Read more >
Multiple S3 Bucket Support Plan
This article outlines the current plan to support replication/migration to multiple S3 buckets. The two solutions considered for this use ...
Read more >
S3 File System to Support Multiple Buckets [#2982231] - Drupal
I'm aware that s3fs module is designed to support only one S3 bucket. I can set the bucket used by s3fs to store...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found