# Dremio unable to find bucket but reads keys of JSON file anyway

**URL:** <https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542>\
**Category:** Uncategorized\
**Created:** [November 8, 2019, 9:58pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542 "2019-11-08T21:58:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwcrook](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/kwcrook/32/2079_2.png) [@kwcrook](https://community.dremio.com/u/kwcrook)\
**Post date:** [November 8, 2019, 9:58pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542/1 "2019-11-08T21:58:14Z")

</div>

We currently have a functioning S3 Connection reading JSON files from three buckets, we’ll call:  
BucketA  
BucketB  
BucketC

My test file `test.json`:  
[{  
“dremio”: “yep”,  
“test” “hurray”  
}]

We added permissions to read from BucketD, which has identical data to that which is successfully being read in BucketA-C, yet Dremio sees the bucket, let’s you navigate into it and select and save the file as a JSON file, but as soon as it takes you into the Data/SQL view it says `Failure reading JSON file - Unable to find bucket named BucketD`, yet if I dismiss the error message, I see displayed in the data view the keys `dremio` and `test`, but no data with them.

Dremio Build: 4.0.2-201910020123580864-a98a0b9

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [November 9, 2019, 6:35pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542/2 "2019-11-09T18:35:35Z")

</div>

@kwcrook

Not exactly following this line “We added permissions to read from BucketD, which has identical data to that which is successfully being read in BucketA-C” but in general, we list all buckets for that account and when you try to select if there is no read permissions we fail

Is this your question?

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![kwcrook](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/kwcrook/32/2079_2.png) [@kwcrook](https://community.dremio.com/u/kwcrook)\
**Post date:** [November 12, 2019, 5:55pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542/3 "2019-11-12T17:55:33Z")

</div>

Let me include the policy to clarify:

```auto
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "s3:*"
      ],
      "Effect": "Allow",
      "Resource": [
        "BucketA",
        "BucketB",
        "BucketC",
        "BucketD"
      ]
    },
    {
      "Action": [
        "s3:ListAllMyBuckets",
        "s3:ListBucket",
        "s3:HeadBucket"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

```

We added BucketD to the policy. When testing the permissions via the aws cli, we are able to connect, decrypt, and read data from BucketA-D but Dremio acts as though it cannot find BucketD even though it can read the json keys (but not the values) from the file within the BucketD.

---

<div class="post-metadata">

**Author:** ![kwcrook](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/kwcrook/32/2079_2.png) [@kwcrook](https://community.dremio.com/u/kwcrook)\
**Post date:** [November 26, 2019, 10:31pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542/4 "2019-11-26T22:31:46Z")

</div>

@balaji.ramaswamy Does that clarify the question?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [November 26, 2019, 11:41pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542/5 "2019-11-26T23:41:06Z")

</div>

@kwcrook

Yes got it, can you please send us the job profile

[Share Query Profile](https://www.dremio.com/tutorials/share-query-profile-dremio/)

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![cholden](https://avatars.discourse-cdn.com/v4/letter/c/e47774/32.png) [@cholden](https://community.dremio.com/u/cholden)\
**Post date:** [April 20, 2020, 4:42pm UTC](https://community.dremio.com/t/dremio-unable-to-find-bucket-but-reads-keys-of-json-file-anyway/4542/6 "2020-04-20T16:42:52Z")

</div>

Balaji,

Had a similar issue that I got through by readding the S3 connection. ([Unable to find bucket named error when querying S3](https://community.dremio.com/t/unable-to-find-bucket-named-error-when-querying-s3/2917/10))  
Hope that helps.

Thanks,  
Chip
