360 Secure SkillHub
360 安全技能中心

Watadot Aws S3

提供 AWS S3 的 CLI 命令模板,覆盖存储桶列出与创建、目录增量同步、对象大小筛选和前缀容量统计,并给出权限、版本控制、加密与生命周期建议;未提供这些治理项的配置命令。

ordiy
ordiy
热度 57.49
最近更新 2026-05-11 17:32:28
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:DevOps / 工作流 / 数据处理 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add watadot-aws-s3
Metadata
name
watadot-aws-s3
description
High-performance S3 management by Watadot Studio. Includes bucket orchestration, sync, and lifecycle management.
metadata
{"openclaw":{"emoji":"🪣","requires":{"anyBins":["aws"]}}}

AWS S3 Skills

Advanced patterns for Amazon Simple Storage Service (S3) utilization.

🚀 Core Commands

Bucket Management

# List all buckets with creation date
aws s3api list-buckets --query "Buckets[].{Name:Name,Created:CreationDate}" --output table

# Create a bucket with specific region
aws s3 mb s3://<bucket-name> --region <region>

High-Speed Synchronization

# Intelligent sync (only changed files)
aws s3 sync ./local-dir s3://<bucket-name>/path --delete --exclude "*.tmp"

# Concurrent upload tuning (performance)
aws configure set default.s3.max_concurrent_requests 20

Content Discovery & Filtering

# Find objects larger than 100MB
aws s3api list-objects-v2 --bucket <bucket-name> --query "Contents[?Size > \`104857600\`].[Key, Size]" --output json

# Total size of a prefix
aws s3 ls s3://<bucket-name>/prefix --recursive --human-readable --summarize | tail -n 2

🧠 Best Practices

  1. Least Privilege: Always use IAM policies that restrict access to specific buckets/prefixes.
  2. Versioning: Enable versioning for critical production data to prevent accidental deletions.
  3. Encrypted at Rest: Enforce SSE-S3 or SSE-KMS for all sensitive objects.
  4. Lifecycle Policies: Automate transition to S3 Glacier for aging assets to optimize cost.