跳到正文
Skillpedia
部署与云(DevOps)48k · #5321

object-storage

它能做什么

这个智能体帮你设置和管理对象存储系统,例如 AWS S3 或 MinIO。它可以让你存储和组织文件,设置随时间自动迁移或删除文件的规则,还能控制谁可以访问这些文件。

适用场景

  • ✓存储视频或备份等大型文件时。
  • ✓想用 MinIO 搭建自己的文件存储系统时。
  • ✓想通过设置自动删除或迁移规则来整理文件时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/object-storage/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/object-storage/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该怎么设置 S3 来存储我的照片备份?”

每周 5 个新技能,1 分钟读完。

工作原理

你用文字指令与这个智能体交流。它会把你的请求翻译成技术指令,用来配置对象存储,无论是在云端(S3)还是在你自己的服务器(MinIO)上。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Object Storage

Configure and manage object storage solutions including AWS S3, MinIO (self-hosted), and compatible providers. Covers CLI operations, bucket policies, lifecycle rules, versioning, encryption, and the MinIO client (mc).

When to Use

  • Storing application assets, backups, logs, or media files
  • Setting up an S3-compatible object store on-premises with MinIO
  • Configuring lifecycle rules to transition or expire objects automatically
  • Implementing access control with bucket policies and IAM
  • Syncing data between local filesystems and object storage
  • Serving static content from S3 or MinIO

Prerequisites

  • AWS CLI v2 installed and configured (aws configure) for S3 operations
  • Docker installed for MinIO self-hosted setup
  • MinIO client (mc) installed for MinIO management
  • IAM credentials with appropriate S3 permissions
  • Network access to the object storage endpoint

AWS S3 CLI Operations

Bucket Management

# Create a new bucket
aws s3 mb s3://my-app-assets-prod

# Create a bucket in a specific region
aws s3 mb s3://my-app-assets-eu --region eu-west-1

# List all buckets
aws s3 ls

# List objects in a bucket (with sizes)
aws s3 ls s3://my-app-assets-prod --recursive --human-readable --summarize

# Delete an empty bucket
aws s3 rb s3://my-old-bucket

# Delete a bucket and ALL its contents (destructive)
aws s3 rb s3://my-old-bucket --force

Upload and Download

# Upload a single file
aws s3 cp ./report.pdf s3://my-app-assets-prod/reports/

# Upload with a specific storage class
aws s3 cp ./archive.tar.gz s3://my-app-assets-prod/archives/ --storage-class GLACIER

# Upload with server-side encryption (AES-256)
aws s3 cp ./sensitive.dat s3://my-app-assets-prod/data/ --sse AES256

# Download a file
aws s3 cp s3://my-app-assets-prod/reports/report.pdf ./downloads/

# Sync a local directory to S3 (upload only changed files)
aws s3 sync ./build/ s3://my-app-assets-prod/static/ --delete

# Sync from S3 to local
aws s3 sync s3://my-app-assets-prod/static/ ./local-copy/

# Sync with exclusion patterns
aws s3 sync ./logs/ s3://my-app-logs/ --exclude "*.tmp" --exclude ".git/*"

# Copy between buckets
aws s3 sync s3://source-bucket/ s3://destination-bucket/ --source-region us-east-1 --region eu-west-1

# Generate a pre-signed URL (temporary access, 1 hour)
aws s3 presign s3://my-app-assets-prod/reports/report.pdf --expires-in 3600

# Recursive delete of a prefix
aws s3 rm s3://my-app-assets-prod/old-data/ --recursive

Versioning

# Enable versioning on a bucket
aws s3api put-bucket-versioning \
  --bucket my-app-assets-prod \
  --versioning-configuration Status=Enabled

# Check versioning status
aws s3api get-bucket-versioning --bucket my-app-assets-prod

# List object versions
aws s3api list-object-versions --bucket my-app-assets-prod --prefix reports/

# Restore a previous version (copy old version to current)
aws s3api copy-object \
  --bucket my-app-assets-prod \
  --copy-source "my-app-assets-prod/reports/report.pdf?versionId=abc123" \
  --key reports/report.pdf

# Delete a specific version permanently
aws s3api delete-object \
  --bucket my-app-assets-prod \
  --key reports/old-report.pdf \
  --version-id abc123

Bucket Policies

# Apply a bucket policy from a JSON file
aws s3api put-bucket-policy --bucket my-app-assets-prod --policy file://policy.json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PublicReadForStaticSite",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-app-assets-prod/static/*"
    },
    {
      "Sid": "DenyUnencryptedUploads",
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::my-app-assets-prod/*",
      "Condition": {
        "StringNotEquals": {
          "s3:x-amz-server-side-encryption": "AES256"
        }
      }
    },
    {
      "Sid": "RestrictToVPC",
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": [
        "arn:aws:s3:::my-app-assets-prod",
        "arn:aws:s3:::my-app-assets-prod/*"
      ],
      "Condition": {
        "StringNotEquals": {
          "aws:sourceVpce": "vpce-abc123"
        }
      }
    }
  ]
}

Lifecycle Rules

# Apply lifecycle configuration
aws s3api put-bucket-lifecycle-configuration \
  --bucket my-app-assets-prod \

…
常见问题

什么是“对象存储”?

它是一种把数字数据以“对象”的形式存放在有组织的系统中的方式,不同于传统文件夹的存放方式。它广泛用于存储大量数据。

S3 和 MinIO 有什么区别?

S3 是亚马逊云服务(AWS)提供的云端对象存储服务。MinIO 则是一款可以安装在自有服务器上的软件,能搭建出与 S3 类似的对象存储系统。

什么是“存储桶策略”和“生命周期规则”?

存储桶策略(bucket policies)规定谁可以对存储桶(即存储空间)中的数据执行哪些操作。生命周期规则则规定数据随时间的处理方式,例如转移到更便宜的存储类型,或在一定期限后删除。

详情

作者的原始描述

Configure object storage with S3, GCS, and MinIO. Implement lifecycle policies and access controls. Use when managing object storage.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5321
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能