Command-line interface for AWS S3 operations including bucket management, synchronization, and object policy configuration.
Install
mkdir -p .claude/skills/aws-s3 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18600" && unzip -o skill.zip -d .claude/skills/aws-s3 && rm skill.zipInstalls to .claude/skills/aws-s3
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
S3 via AWS CLI v2 (`aws s3`). Buckets, objects, storage classes, lifecycle, versioning, website hosting, presigned URLs.Key capabilities
- →Create S3 buckets in a specified region
- →Upload single files or synchronize directories to S3
- →Download S3 objects or synchronize S3 prefixes to local directories
- →Generate presigned URLs for temporary access to S3 objects
- →Configure S3 bucket policies and versioning
- →Set up S3 bucket lifecycle rules
How it works
This skill uses AWS CLI v2 commands like `aws s3 cp` and `aws s3api put-bucket-policy` to interact with S3, performing high-level and low-level operations.
Inputs & outputs
When to use aws-s3
- →Create or list S3 buckets
- →Sync local folders to S3
- →Generate presigned URLs for secure access
- →Configure bucket lifecycle policies
About this skill
AWS CLI v2 — S3 (Simple Storage Service)
Overview
Complete reference for aws s3 (high-level) and aws s3api (low-level) subcommands in AWS CLI v2. Covers bucket management, object operations, storage classes, lifecycle rules, versioning, access policies, encryption, website hosting, and transfer acceleration.
Quick Reference — Common Workflows
Create bucket and upload
aws s3 mb s3://my-bucket --region us-east-1
aws s3 cp local-file.txt s3://my-bucket/path/
aws s3 sync ./local-dir s3://my-bucket/prefix/ --delete
Download and list objects
aws s3 ls s3://my-bucket/prefix/ --recursive
aws s3 cp s3://my-bucket/path/file.txt ./local-file.txt
aws s3 sync s3://my-bucket/prefix/ ./local-dir
Generate presigned URL
aws s3 presign s3://my-bucket/path/file.txt --expires-in 3600
Set bucket policy
aws s3api put-bucket-policy --bucket my-bucket --policy file://policy.json
Enable versioning
aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=Enabled
Configure lifecycle rule
aws s3api put-bucket-lifecycle-configuration --bucket my-bucket --lifecycle-configuration file://lifecycle.json
Measure bucket storage size
There are two different "sizes" — return both. See storage-sizing.md for the full method, downsides, and reconciliation.
# Logical size (current objects, real-time). Simplest robust path (sums all pages internally):
aws s3 ls s3://my-bucket --recursive --summarize --human-readable
# Pitfalls: `Contents[*].Size --output text | awk '{sum+=$1}'` sums only the FIRST object; AND
# `sum(Contents[].Size)` emits one partial sum PER 1000-object page (re-sum with `| awk '{s+=$1}'`).
# Billable size (fast, O(1)/bucket, ~24-48h lag) — sum ALL storage classes, in the bucket's region:
aws cloudwatch get-metric-data --region <bucket-region> --metric-data-queries file://queries.json \
--start-time "$(date -u -d '3 days ago' +%Y-%m-%dT%H:%M:%SZ)" --end-time "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
Covered Command Groups
| Group | Commands | CLI Service |
|---|---|---|
| High-Level | cp, mv, rm, sync, ls, mb, rb, presign, website | aws s3 |
| Buckets | create, delete, head, list, get/put policy, versioning, lifecycle, encryption, logging, cors, website, acl, replication, accelerate, tagging | aws s3api |
| Objects | get, put, delete, copy, head, list-objects-v2, restore, select, presign, multipart uploads | aws s3api |
| Access Points | create, delete, get, list access points and policies | aws s3control |
Command Reference
See index.md for the quick reference table and global options.
| Group | File | Commands |
|---|---|---|
| Storage Sizing (logical vs billable) | storage-sizing.md | measuring bucket size correctly: s3 ls --summarize, sum(Contents[].Size), CloudWatch BucketSizeBytes; common miscalculations |
High-Level Commands (aws s3) | high-level-commands.md | cp, mv, rm, sync, ls, mb, rb, presign, website |
Bucket Management (aws s3api) | bucket-management.md | create-bucket, delete-bucket, head-bucket, list-buckets, get-bucket-location |
| Bucket Configuration | bucket-configuration.md | put-bucket-policy, get-bucket-policy, delete-bucket-policy, get-bucket-policy-status, put-bucket-versioning, get-bucket-versioning, put-bucket-lifecycle-configuration, get-bucket-lifecycle-configuration, delete-bucket-lifecycle, put-bucket-encryption, get-bucket-encryption, delete-bucket-encryption, put-bucket-logging, get-bucket-logging, put-bucket-cors, get-bucket-cors, delete-bucket-cors, put-bucket-website, get-bucket-website, delete-bucket-website, put-bucket-acl, get-bucket-acl, put-bucket-replication, get-bucket-replication, delete-bucket-replication, put-bucket-tagging, get-bucket-tagging, delete-bucket-tagging, put-bucket-notification-configuration, get-bucket-notification-configuration, put-public-access-block, get-public-access-block, delete-public-access-block, put-bucket-accelerate-configuration, get-bucket-accelerate-configuration |
| Object Operations | object-operations.md | put-object, get-object, delete-object, delete-objects, copy-object, head-object, list-objects-v2, list-object-versions, restore-object, get-object-acl, put-object-acl, get-object-tagging, put-object-tagging, delete-object-tagging, get-object-attributes |
| Multipart Uploads | multipart-uploads.md | create-multipart-upload, upload-part, upload-part-copy, complete-multipart-upload, abort-multipart-upload, list-multipart-uploads, list-parts |
When not to use it
- →When only the first object's size is needed from a list
- →When a partial sum per 1000-object page is acceptable for size calculation
- →When real-time billable size is required, as there is a 24-48 hour lag
Limitations
- →The `sum(Contents[].Size)` command emits one partial sum per 1000-object page.
- →Billable size metrics from CloudWatch have a 24-48 hour lag.
- →The `aws s3 ls` command with `--summarize` provides logical size, not billable size.
How it compares
This skill provides direct command-line interaction with S3, unlike manual console operations or custom SDK integrations.
Compared to similar skills
aws-s3 side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| aws-s3 (this skill) | 0 | 17d | Review | Intermediate |
| aws-solution-architect | 20 | 2mo | Review | Advanced |
| terraform-module-library | 7 | 4mo | No flags | Advanced |
| cloud-architect | 6 | 3mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by chrishuffman5
View all by chrishuffman5 →You might also like
aws-solution-architect
alirezarezvani
Design AWS architectures for startups using serverless patterns and IaC templates. Use when asked to design serverless architecture, create CloudFormation templates, optimize AWS costs, set up CI/CD pipelines, or migrate to AWS. Covers Lambda, API Gateway, DynamoDB, ECS, Aurora, and cost optimization.
terraform-module-library
wshobson
Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.
cloud-architect
sickn33
Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns. Masters serverless, microservices, security, compliance, and disaster recovery. Use PROACTIVELY for cloud architecture, cost optimization, migration planning, or multi-cloud strategies.
kubernetes-architect
sickn33
Expert Kubernetes architect specializing in cloud-native infrastructure, advanced GitOps workflows (ArgoCD/Flux), and enterprise container orchestration. Masters EKS/AKS/GKE, service mesh (Istio/Linkerd), progressive delivery, multi-tenancy, and platform engineering. Handles security, observability, cost optimization, and developer experience. Use PROACTIVELY for K8s architecture, GitOps implementation, or cloud-native platform design.
aws-advisor
tech-leads-club
Expert AWS Cloud Advisor for architecture design, security review, and implementation guidance. Leverages AWS MCP tools for accurate, documentation-backed answers. Use when user asks about AWS architecture, security, service selection, migrations, troubleshooting, or learning AWS. Triggers on AWS, Lambda, S3, EC2, ECS, EKS, DynamoDB, RDS, CloudFormation, CDK, Terraform, Serverless, SAM, IAM, VPC, API Gateway, or any AWS service.
devops-iac-engineer
davila7
Implements infrastructure as code using Terraform, Kubernetes, and cloud platforms. Designs scalable architectures, CI/CD pipelines, and observability solutions. Provides security-first DevOps practices and site reliability engineering guidance.