> For the complete documentation index, see [llms.txt](https://docs.0xrushi.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0xrushi.xyz/cloud-security/s3-bucket-enum-cheat-sheet.md).

# S3 BUCKET ENUM CHEAT SHEET

## S3 Bucket Enumeration Cheat Sheet

### Basic Operations

#### List Buckets (Authenticated Account)

```
aws s3 ls
```

#### Check if Bucket Exists (No Auth Required)

```
aws s3 ls s3://[bucket-name] --no-sign-request
```

#### List Bucket Contents (Public/Accessible)

```
aws s3 ls s3://[bucket-name]/[optional-path] --no-sign-request
```

### File Operations

#### Download Object

```
aws s3 cp s3://[bucket-name]/[key] [local-file] --no-sign-request
```

#### Upload File (Test Write Access)

```
aws s3 cp test.txt s3://[bucket-name]/test.txt
```

> Note: Only works if write access is permitted

### Permission Enumeration (Authenticated)

#### Get Bucket Policy

```
aws s3api get-bucket-policy --bucket [bucket-name]
```

#### Get Bucket ACL

```
aws s3api get-bucket-acl --bucket [bucket-name]
```

#### Get Public Access Block Settings

```
aws s3api get-bucket-public-access-block --bucket [bucket-name]
```

#### Get CORS Configuration

```
aws s3api get-bucket-cors --bucket [bucket-name]
```

### Comprehensive Enumeration (Compromised Credentials)

#### List All Buckets

```
aws s3api list-buckets
```

#### List Bucket Objects

```
aws s3api list-objects --bucket [bucket-name] --output table
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.0xrushi.xyz/cloud-security/s3-bucket-enum-cheat-sheet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
