Aws S3 Management

aj-geddes/useful-ai-prompts/skills/aws-s3-management

作者 aj-geddes3f5182cfd739無授權條款355 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 個月前更新

Manage S3 buckets with versioning, encryption, access control, lifecycle policies, and replication. Use for object storage, static sites, and data lakes.

包含腳本DevOps & Cloud
AI 產生的概覽

管理 AWS S3 儲存貯體:建立、版本控制、加密、存取控制、生命週期政策與複寫。

功能
此技能引導代理管理 Amazon S3 物件儲存,涵蓋儲存貯體建立與設定、版本控制、伺服器端加密、封鎖公開存取、儲存貯體政策、生命週期政策以及跨區域複寫。它提供 AWS CLI 指令範例,並附上 CLI 設定、生命週期規則、Terraform 設定與預先簽署 URL 的參考指南。它也包含一支驗證指令碼與一個 API 範本,並列出安全使用儲存貯體的最佳實務。
適用情境
適用於物件儲存相關工作,例如靜態網站託管、備份與封存、媒體庫與 CDN 來源、資料湖、日誌儲存、應用程式資源儲存、災難復原以及資料分享。當儲存貯體需要設定加密、版本控制、存取控制或生命週期規則時也適用。
執行需求
需要具備對 AWS 帳戶的 AWS CLI 存取權,並擁有執行 S3 操作的權限;Terraform 設定參考需要 Terraform。需要連線至 AWS 的網路存取。此技能附有可執行指令碼(scripts/validate-api.sh)與範本(templates/api-scaffold.yaml)。

AWS S3 Management

Table of Contents

Overview

Amazon S3 provides secure, durable, and highly scalable object storage. Manage buckets with encryption, versioning, access controls, lifecycle policies, and cross-region replication for reliable data storage and retrieval.

When to Use

  • Static website hosting
  • Data backup and archival
  • Media library and CDN origin
  • Data lake and analytics
  • Log storage and analysis
  • Application asset storage
  • Disaster recovery
  • Data sharing and collaboration

Quick Start

Minimal working example:

bash
# Create bucketaws s3api create-bucket \  --bucket my-app-bucket-$(date +%s) \  --region us-east-1
# Enable versioningaws s3api put-bucket-versioning \  --bucket my-app-bucket \  --versioning-configuration Status=Enabled
# Block public accessaws s3api put-public-access-block \  --bucket my-app-bucket \  --public-access-block-configuration \    BlockPublicAcls=true,IgnorePublicAcls=true,\    BlockPublicPolicy=true,RestrictPublicBuckets=true
# Enable encryptionaws s3api put-bucket-encryption \  --bucket my-app-bucket \  --server-side-encryption-configuration '{    "Rules": [{      "ApplyServerSideEncryptionByDefault": {        "SSEAlgorithm": "AES256"      }// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
S3 Bucket Creation and Configuration with AWS CLI [blocked]S3 Bucket Creation and Configuration with AWS CLI
S3 Lifecycle Policy Configuration [blocked]S3 Lifecycle Policy Configuration
Terraform S3 Configuration [blocked]Terraform S3 Configuration
S3 Access with Presigned URLs [blocked]S3 Access with Presigned URLs

Best Practices

✅ DO

  • Enable versioning for important data
  • Use server-side encryption
  • Block public access by default
  • Implement lifecycle policies
  • Enable logging and monitoring
  • Use bucket policies for access control
  • Enable MFA delete for critical buckets
  • Use IAM roles instead of access keys
  • Implement cross-region replication

❌ DON'T

  • Make buckets publicly accessible
  • Store sensitive credentials
  • Ignore CloudTrail logging
  • Use overly permissive policies
  • Forget to set lifecycle rules
  • Ignore encryption requirements

來源與署名

來源:aj-geddes/useful-ai-prompts位於skills/aws-s3-management提交3f5182c

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架