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.

using Storage - no plugin found in Storage for the provider

See original GitHub issue

** Which Category is your question related to? ** Storage

** What AWS Services are you utilizing? ** Amazon S3

** Provide additional details e.g. code snippets ** I am trying to create a simple static file in my S3 bucket with amplify, i have added storage through the amplify cli already and my config has the bucket.

my amplify configuration:

import Amplify, { Auth } from 'aws-amplify';
import aws_config from './aws-exports';

const config = {
  ...aws_config,
  graphql_headers: async () => {
    try {
      const token = (await Auth.currentSession()).getIdToken().getJwtToken();
      return { Authorization: token };
    } catch (e) {
      console.error(e);
      return {};
    }
  }
};

Amplify.configure(config);

and when I am trying to use the Storage module -

import { Storage } from 'aws-amplify';

Storage.put("text.txt", "Hello World", {
  contenType: "text/plain"
});

I get 2 errors -

No plugin found in Storage for the provider
TypeError: Cannot read property 'put' of undefined

here’s an image of the errors - image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:28 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
andfkcommented, Aug 8, 2019

Im facing the same issue as @idanlo and i can’t find a fix to move forward

My logs prints:

[DEBUG] 25:43.841 AuthClass - getting current authenticted user
ConsoleLogger.js:80 [DEBUG] 25:43.843 AuthClass - getting current authenticted user
ConsoleLogger.js:80 [DEBUG] 25:43.848 AuthClass - cannot load federated user from auth storage

The error triggered after using Storage.put was No plugin found in Storage for the provider when using:

import Amplify from '@aws-amplify/core'
import { amplifyConfig } from './config'

Amplify.configure(amplifyConfig)

But i’ve tried with other scenario:

import Storage from '@aws-amplify/storage'
import Auth from '@aws-amplify/auth'
import { amplifyConfig } from './config'

Auth.configure(amplifyConfig.Auth)
Storage.configure(amplifyConfig.Storage.AWSS3)

And now the error is different:

- [WARN] 31:35.966 AWSS3Provider - ensure credentials error No Auth module registered in Amplify
- index.js:1 No credentials

Versions:

"@aws-amplify/auth": "^1.2.31",
"@aws-amplify/core": "^1.0.31",
"@aws-amplify/storage": "^1.1.0",

UPDATE: After updating @aws-amplify/core to ^1.1.0 the following method works, anyway will be nice to go back to Amplify.configure only.

import Storage from '@aws-amplify/storage'
import Auth from '@aws-amplify/auth'
import { amplifyConfig } from './config'

Auth.configure(amplifyConfig.Auth)
Storage.configure(amplifyConfig.Storage.AWSS3)
2reactions
idanlocommented, Jul 30, 2019

@faxad how did you configure the Trust Relationships? also how do you enable debug mode?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Amplify `No plugin found in Storage for the provider` error
I was able to get the application working by a. removing the manual configuration in main.js, b. removing storage completely, c. publishing ...
Read more >
Storage classes - Amazon EKS - AWS Documentation
Create an AWS storage class manifest file for your storage class. The following gp2-storage-class.yaml example defines a storage class called gp2 that uses...
Read more >
Storage - Custom Plugin - React Native - AWS Amplify Docs
You can create your custom pluggable for Storage. This may be helpful if you want to integrate your app with a custom storage...
Read more >
Installing the IBM Cloud Object Storage plug-in on VPC and ...
The plug-in automatically retrieves your cluster location and to set the API endpoint for your IBM Cloud Object Storage buckets in your storage...
Read more >
BEE Plugin Tech Docs | Connect your file storage system
We created a way to connect to a custom file system provider, allowing you to use BEE with your own file storage, no...
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