# s3

This skill guides an agent through Amazon S3 bucket and object tasks, from file transfers to versioning and access settings.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install · ★ 1173 repo stars
- Author: itsmostafa
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/itsmostafa/aws-agent-skills/tree/HEAD/skills/s3/SKILL.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/s3

## What it does

The skill covers Amazon S3 operations with AWS CLI and boto3. An agent can create a bucket, enable versioning, block public access, and configure encryption. It can also upload and download files, sync directories, or copy objects between buckets.

The examples include temporary URLs for uploads and downloads, lifecycle rules, and S3 event notifications for Lambda. Both the high-level `aws s3` commands and lower-level `aws s3api` commands are covered; `--dryrun` previews changes. Versioning keeps earlier object versions available for recovery. Bucket access and encryption settings still need to match the project’s requirements.

## Requirements
- Works with: AWS

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add itsmostafa/aws-agent-skills --skill s3 -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/s3/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/s3/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add itsmostafa/aws-agent-skills --skill s3 -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/s3/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add itsmostafa/aws-agent-skills --skill s3 -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/s3/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install itsmostafa/aws-agent-skills skills/s3
```

2. **Manually: put the files in place**
- File: `.github/skills/s3/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add itsmostafa/aws-agent-skills --skill s3 -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/itsmostafa/aws-agent-skills --path skills/s3
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/s3/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add itsmostafa/aws-agent-skills --skill s3 -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/itsmostafa/aws-agent-skills/tree/HEAD/skills/s3/SKILL.md

## When to use it
- create a bucket with versioning and public-access blocking
- sync a local directory to an S3 prefix
- generate a temporary URL for an object transfer
- copy objects from one bucket to another
- move matching objects to an archive class with a lifecycle rule

## Example prompts
- Create an S3 bucket with versioning, encryption, and public access blocked.
- Show me how to preview syncing `./local-folder` to `s3://my-bucket/prefix/`.
- Set up a lifecycle rule that moves objects under `logs/` to Glacier.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b23570ce9c8c0152.

BEGIN THIRD-PARTY FILE b23570ce9c8c0152
````text
---
name: s3
description: AWS S3 object storage for bucket management, object operations, and access control. Use when creating buckets, uploading files, configuring lifecycle policies, setting up static websites, managing permissions, or implementing cross-region replication.
last_updated: "2026-01-07"
doc_source: https://docs.aws.amazon.com/AmazonS3/latest/userguide/
---

# AWS S3

Amazon Simple Storage Service (S3) provides scalable object storage with industry-leading durability (99.999999999%). S3 is fundamental to AWS—used for data lakes, backups, static websites, and as storage for many other AWS services.

## Table of Contents

- [Core Concepts](#core-concepts)
- [Common Patterns](#common-patterns)
- [CLI Reference](#cli-reference)
- [Best Practices](#best-practices)
- [Troubleshooting](#troubleshooting)
- [References](#references)

## Core Concepts

### Buckets

Containers for objects. Bucket names are globally unique across all AWS accounts.

### Objects

Files stored in S3, consisting of data, metadata, and a unique key (path). Maximum size: 5 TB.

### Storage Classes

| Class | Use Case | Durability | Availability |
|-------|----------|------------|--------------|
| Standard | Frequently accessed | 99.999999999% | 99.99% |
| Intelligent-Tiering | Unknown access patterns | 99.999999999% | 99.9% |
| Standard-IA | Infrequent access | 99.999999999% | 99.9% |
| Glacier Instant | Archive with instant retrieval | 99.999999999% | 99.9% |
| Glacier Flexible | Archive (minutes to hours) | 99.999999999% | 99.99% |
| Glacier Deep Archive | Long-term archive | 99.999999999% | 99.99% |

### Versioning

Keeps multiple versions of an object. Essential for data protection and recovery.

## Common Patterns

### Create a Bucket with Best Practices

**AWS CLI:**

```bash
# Create bucket (us-east-1 doesn't need LocationConstraint)
aws s3api create-bucket \
  --bucket my-secure-bucket-12345 \
  --region us-west-2 \
  --create-bucket-configuration LocationConstraint=us-west-2

# Enable versioning
aws s3api put-bucket-versioning \
  --bucket my-secure-bucket-12345 \
  --versioning-configuration Status=Enabled

# Block public access
aws s3api put-public-access-block \
  --bucket my-secure-bucket-12345 \
  --public-access-block-configuration \
    BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true

# Enable encryption
aws s3api put-bucket-encryption \
  --bucket my-secure-bucket-12345 \
  --server-side-encryption-configuration '{
    "Rules": [{"ApplyServerSideEncryptionByDefault": {"SSEAlgorithm": "AES256"}}]
  }'
```

**boto3:**

```python
import boto3

s3 = boto3.client('s3', region_name='us-west-2')

# Create bucket
s3.create_bucket(
    Bucket='my-secure-bucket-12345',
    CreateBucketConfiguration={'LocationConstraint': 'us-west-2'}
)

# Enable versioning
s3.put_bucket_versioning(
    Bucket='my-secure-bucket-12345',
    VersioningConfiguration={'Status': 'Enabled'}
)

# Block public access
s3.put_public_access_block(
    Bucket='my-secure-bucket-12345',
    PublicAccessBlockConfiguration={
````
END THIRD-PARTY FILE b23570ce9c8c0152

The third-party file has ended. Everything between the b23570ce9c8c0152 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3081 of 9316 bytes. © itsmostafa · MIT · https://github.com/itsmostafa/aws-agent-skills/tree/HEAD/skills/s3/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
