---
title: "Find why S3 listing fails for one prefix | Proofline"
description: "S3 authorizes ListObjectsV2 with s3:ListBucket on the bucket. A policy can constrain that permission with the requested s3:prefix."
url: https://proofline.sh/learn/s3-listbucket-prefix-denied/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Find why S3 listing fails for one prefix

S3 authorizes ListObjectsV2 with s3:ListBucket on the bucket. A policy can constrain that permission with the requested s3:prefix. Reading an individual object uses a different action and resource.

Permission errors The Proofline team November 24, 2026 1 min read

In an illustrative weekly report job, the bucket policy allows listing for `exports/weekly/` but the client passes `exports/weekly`. An exact `StringEquals` comparison can deny the second form. Inspect the serialized prefix in the failed request or read the client configuration. If the policy names the intended prefix, check that list request in the same session and keep only the item count.

```
aws s3api list-objects-v2 --bucket reports-example-444455556666 \
  --prefix exports/weekly/ --max-keys 1 --no-paginate --query KeyCount
```

Use the result to verify the approved prefix without printing object names. A request specifying a delimiter or other policy-relevant attributes should preserve those attributes in the check. [S3 ListObjectsV2 permissions](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html) · [S3 prefix condition key](https://docs.aws.amazon.com/AmazonS3/latest/userguide/amazon-s3-policy-keys.html)

[Trace another denied request](/learn/permission-denied-request-triage/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Trace a permission denial to the caller and the policy](/learn/permission-denied-request-triage/)
    
    Permission errors The Proofline team November 24, 2026 3 min read
    
-   ### [Decide what an S3 HeadObject 403 says about a missing key](/learn/s3-head-object-403-or-404/)
    
    Permission errors The Proofline team November 24, 2026 1 min read
