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.

Storage.list doesn't list contents. Though config correctly displays bucket-name.

See original GitHub issue

Describe the bug Storage.list does not list bucket contents. I’ve tried tons of permutations of paths, but nothing lists.

To Reproduce

    Storage.list('images/photos')
      .then(result => console.log(result))
      .catch(err => console.log(err));


    console.log(Storage);

Expected behavior A list of keys/objects from my bucket.

Screenshots

  1. Example code
  2. Output of code.

storage_snip storage_snip2

Desktop (please complete the following information): Chrome/FF/FF Quantum

I am trying to list the contents in one of my buckets, but nothing seems to be working. Every object is marked as public and there are no ACLs on it. I’ve attached images of my bucket structure below. My guess is I’m somehow messing up the paths.

struct1 struct2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:23 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
tmoore23commented, Apr 22, 2019

Has there been an update on this? I am experience the same issue where my code is returning an empty array when doing the following:

componentWillMount(){
        console.log('Calling S3');
      	Storage.list('/', { level: "public" })
      		.then (result => console.log('Result:', result)) // {key: "test.txt"}
    		.catch(err => console.log(err));
}
1reaction
stale[bot]commented, Jun 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List objects in an Amazon S3 bucket using an AWS SDK
The following code examples show how to list objects in an S3 bucket. .NET. AWS SDK for . ... WriteLine($"Listing the contents of...
Read more >
AWS S3: The bucket you are attempting to access must be ...
I know the region is correct because if I change it to us-east-1 , the following error shows up: The specified key does...
Read more >
Bucket operations - IBM Cloud Docs
When authenticating to your instance of IBM Cloud Object Storage using ... A GET request sent to the endpoint root returns a list...
Read more >
Host a static website | Cloud Storage
Because Cloud Storage doesn't support custom domains with HTTPS on its own, ... For Name your bucket, enter a name that meets the...
Read more >
How can I get the size of an Amazon S3 bucket? - Server Fault
This is very slow for buckets with many files as it basically lists all the objects in the bucket before showing the summary,...
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