s3-intelligent-tiering-optimizer
Optimises S3 storage cost with Intelligent-Tiering: enables bucket-level IntelligentTieringConfiguration, tunes the Archive Access (90-day) and Deep Archive Access (180-day) tiers, models the $0.0025 per-1,000-objects monitoring fee, and emits a deterministic verdict (OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL) per bucket with the exact put-bucket-intelligent-tiering-configuration payload and a net dollar savings estimate. Use when deciding whether to enable Intelligent-Tiering on a bucket with unknown or mixed access patterns, when the monitoring fee might exceed the saving on small objects (<128 KB), when predictable access patterns make lifecycle rules cheaper, or when archive-tier timing needs tuning.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-24
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- s3-intelligent-tiering-optimizer
- license
- Apache-2.0
- metadata
- { "tags": "s3, storage, cost-optimization, intelligent-tiering, access-pattern, finops", "phase": "3", "author": "Jacky Chan — AWS Community Builder", "domain": "aws-cloudops", "family": "Storage", "version": "0.1.0", "keywords": "S3, Intelligent-Tiering, storage class, IntelligentTieringConfiguration, Archive Access, Deep Archive Access, monitoring fee, small object fee aggregation, Frequent Access tier, Infrequent Access tier, storage cost optimization, access pattern analysis, put-bucket-intelligent-tiering-configuration, Storage Lens, lifecycle vs Intelligent-Tiering, S3 Batch Operations", "task_type": "optimize", "complexity": "medium", "entry_point": "false", "skill_class": "capability", "when_to_use": "Deciding whether to enable S3 Intelligent-Tiering on a bucket with unknown or mixed access patterns, tuning the Archive Access and Deep Archive Access tier timing, modelling the $0.0025/1,000-objects monitoring fee against savings, deciding between Intelligent-Tiering and a fixed lifecycle policy for predictable workloads, or auditing whether an existing Intelligent-Tiering configuration is optimal.", "requires_llm": "true", "verdict_shape": "OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL", "lifecycle_status": "active", "invocation_schema": "Input: either (a) a bucket configuration (IntelligentTieringConfiguration JSON, Storage Lens metrics summary, optional object-size histogram), OR (b) a bucket name for live-account optimisation. Output: deterministic BUCKET/VERDICT/REASON/RECOMMENDATION/SAVINGS/IMPLEMENTATION block per bucket, where VERDICT is one of OPTIMIZED, OPPORTUNITY_FOUND, ALREADY_OPTIMAL.", "supports_pipeline": "true", "activation_triggers": "enable S3 Intelligent-Tiering, Intelligent-Tiering monitoring fee, S3 Intelligent-Tiering vs lifecycle, S3 archive tier configuration, S3 Deep Archive Access tier, S3 access pattern analysis, should I use Intelligent-Tiering, IntelligentTieringConfiguration, put-bucket-intelligent-tiering-configuration, S3 small object fee aggregation, S3 storage cost optimization" }
- description
- Optimises S3 storage cost with Intelligent-Tiering: enables bucket-level IntelligentTieringConfiguration, tunes the Archive Access (90-day) and Deep Archive Access (180-day) tiers, models the $0.0025 per-1,000-objects monitoring fee, and emits a deterministic verdict (OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL) per bucket with the exact put-bucket-intelligent-tiering-configuration payload and a net dollar savings estimate. Use when deciding whether to enable Intelligent-Tiering on a bucket with unknown or mixed access patterns, when the monitoring fee might exceed the saving on small objects (<128 KB), when predictable access patterns make lifecycle rules cheaper, or when archive-tier timing needs tuning.
- compatibility
- Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline configuration classification. Live-account audits use aws s3api list-bucket-intelligent-tiering-configurations, put-bucket-intelligent-tiering-configuration, get-bucket-intelligent-tiering-configuration, list-objects-v2 (with --page-size for inventory), and aws s3control get-storage-lens-configuration (AWS CLI v2, SSO or key-based credentials). Pricing is us-east-1 published...
02 资源文件 21
- 参考文档eval/test-cases.yaml8.0 KB
- 参考文档evals/baselines/already-optimal-full-config.md715 B
- 参考文档evals/baselines/archive-tiers-not-configured.md825 B
- 参考文档evals/baselines/mixed-access-enable-intelligent-tiering.md1.0 KB
- 参考文档evals/baselines/predictable-access-lifecycle-cheaper.md754 B
- 参考文档evals/baselines/small-objects-rejected-monitoring-fee.md786 B
- 参考文档evals/eval_config.yaml2.0 KB
- 参考文档evals/evals.json4.7 KB
- 参考文档evals/prompts/already-optimal-full-config.md1.0 KB
- 参考文档evals/prompts/archive-tiers-not-configured.md1.0 KB
- 参考文档evals/prompts/mixed-access-enable-intelligent-tiering.md877 B
- 参考文档evals/prompts/predictable-access-lifecycle-cheaper.md950 B
- 参考文档evals/prompts/small-objects-rejected-monitoring-fee.md890 B
- 参考文档examples/README.md6.3 KB
- 参考文档references/advanced-patterns.md7.1 KB
- 参考文档references/diagnostic-commands.md2.9 KB
- 参考文档references/error-handling.md2.0 KB
- 参考文档references/intelligent-tiering-cost-model.md5.1 KB
- 参考文档references/intelligent-tiering-vs-lifecycle.md5.2 KB
- 参考文档references/worked-examples.md2.7 KB
- 参考文档skill.usf.yaml4.3 KB
03 SKILL.md 正文
S3 Intelligent-Tiering Optimizer
What this skill does
Translates an S3 access-pattern posture into a concrete
Intelligent-Tiering configuration (IntelligentTieringConfiguration) and a
dollar-denominated net savings estimate. The verdict is the
highest-leverage action across four dimensions — Intelligent-Tiering
eligibility, archive-tier tuning, monitoring-fee math, and
fixed-lifecycle-vs-Intelligent-Tiering trade-off — applied in priority
order. Always pairs the recommendation with the exact
put-bucket-intelligent-tiering-configuration payload so the operator can
paste, review, and apply. When Intelligent-Tiering is NOT the right tier,
emits ALREADY_OPTIMAL with the explicit reason (small-object surcharge,
predictable access pattern, or a fixed lifecycle rule being cheaper).
Quick navigation
| Section | What it covers | When to read it |
|---|---|---|
| § Quick reference | Verdict thresholds + Intelligent-Tiering tier table | Before any operation |
| § Decision tree | When Intelligent-Tiering wins vs Standard / lifecycle | Choosing the storage tier |
| § Expert heuristic | The non-obvious rules (monitoring-fee gate, 128 KB minimum, tiering-incrementality) | Understanding the cost model |
| § Pre-flight | Bucket metadata gate — directory bucket, Object Lock, existing config | Before executing any CLI |
| § Process | Per-bucket optimisation logic (Steps 0-5) | When classifying a bucket |
| § STRICT output contract | The deterministic BUCKET/VERDICT/REASON/RECOMMENDATION/SAVINGS/IMPLEMENTATION template | Formatting the response |
| § Anti-Patterns | Top-5 NEVER list — the most common misconfigurations | Review before risky operations |
Quick reference — verdict thresholds
| Verdict | Trigger condition | Action |
|---|---|---|
OPPORTUNITY_FOUND |
Intelligent-Tiering is eligible and net-saving-positive AND one of (not enabled, archive tiers unconfigured, wrong filter scope, wrong tier timing) | Emit recommended IntelligentTieringConfiguration JSON + savings estimate |
OPTIMIZED |
An Intelligent-Tiering configuration change was applied this session and verified | Emit post-state verification and recompute savings |
ALREADY_OPTIMAL |
Intelligent-Tiering is ineligible (small objects, predictable access, directory bucket) OR already optimally configured | No action — confirm posture |
Priority order for evaluation dimensions (apply in this sequence, aggregate all applicable into a single recommendation):
- Eligibility gate — directory buckets, S3 Tables prefixes, and Object-Lock-only compliance archives do not benefit from Intelligent-Tiering. Resolve first to avoid wasted analysis.
- Monitoring-fee gate — the $0.0025/1,000-objects fee must not exceed the transition saving. The gate is mandatory for buckets with a high count of small objects.
- Archive-tier tuning — most under-configured Intelligent-Tiering setups use the defaults only; Archive Access at 90 days and Deep Archive Access at 180 days are tunable for known-cold data.
- Intelligent-Tiering-vs-lifecycle trade-off — for predictable access patterns a fixed lifecycle rule is cheaper (no monitoring fee); surface the comparison.
Cost baseline summary (us-east-1, 2026, USD per GB-month):
| Tier | $/GB-mo | Trigger | Monitoring | Retrieval |
|---|---|---|---|---|
| Frequent Access | 0.023 | Default (hot) | $0.0025/1K obj (whole bucket) | free |
| Infrequent Access | 0.0125 | 30 consecutive days no access | included | $0.01/GB |
| Archive Access | 0.0036 | 90 consecutive days no access (configurable) | included | $0.03/GB Std |
| Deep Archive Access | 0.00099 | 180 consecutive days no access (configurable) | included | $0.02-10/GB tiered |
For comparison: Standard $0.023, Standard-IA $0.0125 (30-day minimum),
Glacier Instant Retrieval $0.004 (90-day minimum), Glacier Deep Archive
$0.00099 (180-day minimum). Intelligent-Tiering has NO minimum-duration
charge on the Frequent/Infrequent tiers — the only IA-style tier with
that property — which is the basis of its value proposition for unknown
patterns. Load references/intelligent-tiering-cost-model.md before
producing dollar estimates — it contains the full request-fee table,
retrieval-tier breakdowns, regional multipliers, and the small-object-fee
aggregation math. The inline table is a quick-selection aid, not a
quoting source.
Decision tree — when Intelligent-Tiering wins
Read top-to-bottom; first match wins. Always pair the verdict with access-pattern evidence from Storage Lens — a tree verdict without observed access data is a guess.
START: Is the average object size >= 128 KB?
├── NO → Standard (IA minimum billable size 128 KB; monitoring fee
│ would exceed transition saving). Verdict: ALREADY_OPTIMAL
│ for Intelligent-Tiering. Surface small-object fee aggregation
│ (Step 0) as a parallel finding.
└── YES → Is the access pattern genuinely UNKNOWN or MIXED?
├── NO → Is the pattern predictable?
│ ├── Daily/weekly access → Standard. Cheaper than
│ │ Intelligent-Tiering (no monitoring fee).
│ ├── Monthly access → Fixed lifecycle to Standard-IA at 30d
│ │ (no monitoring fee, same $/GB as Infrequent tier).
│ ├── Quarterly+ access → Fixed lifecycle to Glacier IR / Deep
│ │ Archive (cheaper than Archive Access tier for known-cold).
│ └── UNKNOWN (no Storage Lens data) → Intelligent-Tiering is the
│ safest default — the monitoring fee is the cost of access-
│ pattern discovery. Plan a 90-day review.
└── YES → Is the monitoring fee < the projected transition saving?
├── NO → Standard (monitoring fee exceeds saving). Verdict:
│ ALREADY_OPTIMAL with the math.
└── YES → Intelligent-Tiering. Pick the archive-tier timing:
├── Known cold data, 12h-retrieve OK → Deep Archive Access
│ at 90 days (override default 180; capture saving faster).
├── Known cold data, ms-retrieve needed → Archive Access
│ at 90 days (Glacier-tier $0.0036/GB).
└── Default (no tuning) → Archive Access 90d, Deep Archive
Access 180d.
Special-case branches (override the main tree):
- Directory bucket (S3 Express One Zone, name suffix
--x-s3): Intelligent-Tiering is NOT supported. Verdict is ALREADY_OPTIMAL for ML/AI latency-critical workloads. Do not run the tree. - Object Lock COMPLIANCE mode retention: Intelligent-Tiering tier transitions are honoured, but archive tiers defeat compliance-lookup latency. Use Frequent Access only (no archive-tier configuration) for compliance workloads requiring periodic retrieval.
- Cross-Region Replication destination: Intelligent-Tiering applies to the destination independently of the source. Run the tree on both sides.
- S3 Tables (Apache Iceberg) prefixes: table lifecycle is managed via table APIs. Surface as a finding only; do not propose Intelligent-Tiering on table-data prefixes.
Expert heuristic — the non-obvious rules
One-line takeaway: Intelligent-Tiering is the only S3 tier that optimises the storage class on a per-object basis without a minimum-duration charge on the Frequent/Infrequent tiers — but the $0.0025/1,000-objects monitoring fee is the gating cost that decides whether it wins. Five non-obvious rules drive the verdict:
-
Rule 1 — Monitoring fee is a flat tax on object count, not bytes. A bucket of 10 million 1 KB objects pays $25/month in monitoring fees and captures ~$0 in transition saving (Infrequent-tier 128 KB minimum billable size means small objects don't actually move). The monitoring-fee gate (Step 2) is the single most important check.
-
Rule 2 — Intelligent-Tiering has no minimum-duration charge on Frequent/Infrequent. A Standard-IA transition bills 30 days minimum even if the object is deleted on day 1. Intelligent-Tiering bills the Infrequent tier per-day, no minimum. This makes Intelligent-Tiering cheaper for short-lived-but-unknown-pattern workloads where lifecycle-driven IA would incur minimum-duration charges.
-
Rule 3 — Archive Access and Deep Archive Access DO have 90/180-day minimums. The Frequent/Infrequent tiers are minimum-free; the archive tiers are NOT. A 60-day-old object moved to Archive Access and then retrieved bills the 90-day minimum. Always surface the minimum-duration caveat on archive-tier recommendations.
-
Rule 4 — Archive-tier timing is configurable (90/180 are defaults, not minimums).
Tierings[{AccessTier: ARCHIVE_ACCESS, Days: 90}]is the default lower bound; you can configure Days >= 90 for Archive Access and Days >= 180 for Deep Archive Access. Shorter windows capture savings faster on known-cold data. -
Rule 5 — Intelligent-Tiering and lifecycle rules are separate systems. A lifecycle rule transitions objects based on age; Intelligent-Tiering transitions based on access pattern. They can coexist on the same bucket but should not target the same prefix (double-tiering produces unpredictable results). Pick one per prefix.
Pre-flight: bucket metadata gate
Full gate - pagination notes, live-account CLI listing, malformed-input handling, and the bucket-attribute effect table: references/diagnostic-commands.md.
Process — optimisation logic (apply in order, aggregate all applicable)
Step 0: Expert knowledge - non-obvious Intelligent-Tiering behaviors
Full list - monitoring-fee scope, configurable archive timing, minimum-duration rules, 128 KB billable size, tiering lag, filter no-op risk, fee aggregation, lifecycle coexistence, Batch Operations backfill, Storage Lens evidence: references/advanced-patterns.md.
Step 1: Eligibility gate
Resolve these before any further analysis. If any condition fails,
verdict is ALREADY_OPTIMAL for Intelligent-Tiering (with a documented
reason) — do NOT proceed to Step 2.
- Directory bucket (name suffix
--x-s3): Intelligent-Tiering NOT supported. Surface the $0.16/GB cost as a finding. - S3 Tables prefixes (Apache Iceberg): table-data prefixes manage their own lifecycle. Surface as a finding only.
- Predictable access pattern with known frequency: a fixed lifecycle rule is cheaper (no monitoring fee). See Step 4 for the trade-off.
- Compliance archive with Object Lock COMPLIANCE mode requiring periodic retrieval: Frequent Access only; archive tiers defeat the retrieval SLA.
Step 2: Monitoring-fee gate (mandatory for small/many-object buckets)
The monitoring fee is $0.0025 × object_count / 1000 per month. The
gate FAILS when the monitoring fee >= projected transition saving.
Calculation:
monitoring_fee_monthly = (object_count / 1000) × 0.0025projected_transition_saving_monthly = bytes_that_will_tier_GB × (Frequent_rate - Infrequent_rate)for the first tiering transition- For small objects (< 128 KB),
bytes_that_will_tieris effectively 0 because the Infrequent tier's 128 KB minimum billable size prevents cost reduction. The monitoring fee is pure overhead.
Threshold check: if monitoring_fee_monthly > projected_transition_saving_monthly, the verdict is ALREADY_OPTIMAL
for the Intelligent-Tiering dimension. Surface the calculation so the
operator sees the math.
Small-object fee aggregation note: for buckets with > 1 million small objects, AWS may aggregate the per-object fees into a bulk billing line. This does NOT change the monitoring-fee math — it changes the cost-allocation presentation. The gate still applies.
Step 3: Archive-tier tuning
For buckets where Intelligent-Tiering is eligible and the monitoring-fee gate passes, evaluate the archive-tier configuration:
- No archive tiers configured (only Frequent + Infrequent): opportunity to add Archive Access at 90 days and Deep Archive Access at 180 days. Captures 84% storage saving on cold objects vs Standard.
- Archive Access configured, Deep Archive Access missing: add Deep Archive Access for data accessed less than yearly (12h retrieve OK).
- Default timing (90/180 days) on known-cold data: shorten to the minimum allowed (90 for Archive Access, 180 for Deep Archive Access) to capture savings faster.
- Archive tiers configured on compliance workload requiring periodic retrieval: surface as a finding — archive tiers defeat retrieval SLA.
Step 4: Intelligent-Tiering-vs-lifecycle trade-off
For predictable access patterns, compare Intelligent-Tiering against a fixed lifecycle rule:
| Pattern | Intelligent-Tiering cost | Fixed lifecycle cost | Winner |
|---|---|---|---|
| Daily access | $0.023 + monitoring | Standard $0.023 | Lifecycle (no monitoring fee) |
| Monthly access | Frequent + Infrequent auto, + monitoring | Standard -> Standard-IA at 30d | Lifecycle (same $/GB, no monitoring) |
| Quarterly access | + Archive Access auto, + monitoring | Standard -> Glacier IR at 90d | Lifecycle (Glacier IR $0.004 < Archive $0.0036? Tie — but no monitoring fee) |
| Yearly+ access | + Deep Archive Access, + monitoring | Standard -> Deep Archive at 180d | Lifecycle (no monitoring fee, same $/GB) |
| Unknown / mixed | Auto-tiers by pattern, + monitoring | Cannot predict rule | Intelligent-Tiering |
If a fixed lifecycle rule wins on cost (predictable pattern), the
verdict for the Intelligent-Tiering dimension is ALREADY_OPTIMAL with
a pointer to the lifecycle-optimizer skill.
Step 5: Aggregation — emit the highest-leverage recommendation
Aggregate ALL applicable dimensions into a single recommended
IntelligentTieringConfiguration. The verdict is OPPORTUNITY_FOUND if
any dimension has a net-positive saving. If no dimension has an
opportunity: ALREADY_OPTIMAL. If the recommendation was applied this
session and verified: OPTIMIZED.
STRICT output contract (per bucket)
BUCKET: <bucket-name>
VERDICT: OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL
REASON: <1-2 sentences citing the highest-leverage dimension and step number>
RECOMMENDATION:
<IntelligentTieringConfiguration JSON or "No changes required">
SAVINGS:
CURRENT_MONTHLY: $<X.XX>
PROJECTED_MONTHLY: $<Y.YY>
MONTHLY_SAVING: $<X.XX - Y.YY>
ANNUAL_SAVING: $<12 × monthly>
CAVEATS: <monitoring-fee math, archive-tier minimums, retrieval fees>
IMPLEMENTATION:
1. aws s3api put-bucket-intelligent-tiering-configuration --bucket <name> --id <Config> --intelligent-tiering-configuration file://config.json
2. <verification command>
3. <backfill via S3 Batch Operations if existing objects need immediate tiering>
Worked example — enable Intelligent-Tiering with archive tiers
BUCKET: app-data-mixed
VERDICT: OPPORTUNITY_FOUND
REASON: Bucket has mixed/unknown access patterns (avg age 95 days, 18%
accessed daily, 60% accessed < 1x/month per Storage Lens). Average
object size 1.8 MB (well above 128 KB gate). No Intelligent-Tiering
configuration present (Step 1, Step 3). Archive tiers not configured.
RECOMMENDATION:
{
"Id": "Config",
"Status": "Enabled",
"Tierings": [
{"AccessTier": "ARCHIVE_ACCESS", "Days": 90},
{"AccessTier": "DEEP_ARCHIVE_ACCESS", "Days": 180}
]
}
SAVINGS:
CURRENT_MONTHLY: $1,288.00 (56,000 GB × $0.023 Standard)
PROJECTED_MONTHLY: $342.50
- 11,200 GB Frequent (20%) × $0.023 = $257.60
- 22,400 GB Infrequent (40%) × $0.0125 = $280.00
- 11,200 GB Archive (20%) × $0.0036 = $40.32
- 11,200 GB Deep Archive (20%) × $0.00099 = $11.09
- Monitoring fee: 30,000,000 obj / 1,000 × $0.0025 = $75.00
- Total: 257.60 + 280.00 + 40.32 + 11.09 + 75.00 = $664.01
- Adjusted for tiering lag (first 90 days, partial Archive):
$342.50 blended
MONTHLY_SAVING: $945.50
ANNUAL_SAVING: $11,346.00
CAVEATS:
- Monitoring fee: $75.00/month (30M objects × $0.0025/1K). Saving
net of monitoring: $945.50/month. Monitoring fee is < 8% of saving
— well within the gate.
- Archive Access 90-day minimum: objects retrieved before 90 days
bill the prorated remainder.
- Deep Archive Access 180-day minimum applies; retrieval $0.02-10/GB.
- Tiering transitions are asynchronous (~24h evaluation cycle).
IMPLEMENTATION:
1. CONFIRM: About to put-bucket-intelligent-tiering-configuration on
bucket app-data-mixed (account <acct>, region us-east-1). This
enables Intelligent-Tiering with Archive Access at 90d and Deep
Archive Access at 180d. The configuration applies to all objects
(no filter). Monitoring fee: ~$75/month. Proceed? (yes/no)
2. aws s3api put-bucket-intelligent-tiering-configuration \
--bucket app-data-mixed \
--id Config \
--intelligent-tiering-configuration file://config.json
3. Verify: aws s3api list-bucket-intelligent-tiering-configurations \
--bucket app-data-mixed
4. Backfill existing Standard objects via S3 Batch Operations:
aws s3control create-job --account-id <acct> \
--operation '{"S3CopyObject": {"TargetStorageClass": "INTELLIGENT_TIERING"}}' \
--manifest-location s3://<manifest-bucket>/manifest.csv \
--report-spec '<report-config>'
Additional worked examples (small-object monitoring-fee rejection; already-optimal configuration): references/worked-examples.md.
Verdict consistency rules (prevent misclassification)
The skill MUST emit verdicts that are mathematically and logically self-consistent. The following rules are mandatory checks before any output is finalized:
-
Zero-savings rule. If
MONTHLY_SAVING == $0.00for every dimension, the verdict MUST beALREADY_OPTIMAL, neverOPPORTUNITY_FOUND. A finding with "OPPORTUNITY_FOUND" and "$0.00 monthly saving" in the same output block is a contradiction and a hard error. -
Negative-savings rule. If the projected monthly cost is HIGHER than current (e.g., monitoring fee exceeds the transition saving), the verdict for that dimension is "no action" and MUST NOT be aggregated into
OPPORTUNITY_FOUND. EmitALREADY_OPTIMALwith the reasoning that the current tier is already cheapest. -
Monitoring-fee gate. Recommending Intelligent-Tiering on a bucket where
monitoring_fee_monthly > projected_transition_saving_monthlyis a hard error. Always surface the monitoring-fee calculation in the SAVINGS block before the verdict. -
128 KB minimum gate. Recommending Intelligent-Tiering on a bucket where the average object size < 128 KB MUST surface the Infrequent- tier 128 KB minimum billable size and confirm it does not defeat the saving. For buckets where the majority of objects are < 128 KB, the verdict is
ALREADY_OPTIMAL. -
SAVINGS arithmetic check.
CURRENT_MONTHLY - PROJECTED_MONTHLYMUST equalMONTHLY_SAVING. If the three numbers don't reconcile, re-compute before emitting. Round to 2 decimal places. -
Archive-tier minimum-duration disclosure. Any recommendation configuring Archive Access or Deep Archive Access MUST include the 90/180-day minimum-duration caveat and the retrieval-fee range in
CAVEATS. A bareTieringsrule without these caveats is non- compliant. -
Filter-prefix reality check. Before emitting
OPPORTUNITY_FOUNDon a configuration with a filter, verify the proposed filter prefix matches actual key prefixes in Storage Lens orlist-objects-v2 --prefix. A rule with a non-matching prefix is silently a no-op.
These rules are evaluated AFTER Step 5 aggregation but BEFORE emitting the output block. If any rule fails, re-run the relevant step.
Anti-Patterns — NEVER (top 5)
These are the five highest-impact mistakes. Each one materially misleads the operator or produces a non-functional configuration.
-
NEVER recommend Intelligent-Tiering on a bucket of small objects (< 128 KB) without surfacing the monitoring fee. At $0.0025/1,000 objects, a bucket of 10M small JSON files costs $25/month in monitoring alone — often more than the transition saving. The Infrequent tier's 128 KB minimum billable size means small objects do not actually save on tiering. Always run Step 2 (monitoring-fee gate) before recommending.
-
NEVER conflate Intelligent-Tiering with S3 Lifecycle. They are separate systems. Intelligent-Tiering uses
put-bucket-intelligent- tiering-configuration; lifecycle usesput-bucket-lifecycle-configuration. They can coexist on the same bucket but should NOT target the same prefix — double-tiering produces unpredictable results. Pick one system per prefix. -
NEVER propose Intelligent-Tiering on a directory bucket (S3 Express One Zone, name suffix
--x-s3). Directory buckets do not support Intelligent-Tiering, lifecycle, or Glacier tiers. Surface the $0.16/GB cost as a finding; the verdict for a directory bucket is ALREADY_OPTIMAL for latency-critical ML/AI workloads. -
NEVER assume the default archive-tier timing (90/180 days) is a minimum. It is configurable. For known-cold data, shorter windows (down to the lower bound) capture savings faster. Always evaluate whether the defaults match the observed access pattern before declaring ALREADY_OPTIMAL.
-
NEVER auto-apply
put-bucket-intelligent-tiering-configurationwithout the CONFIRM gate. A wrong filter scope can mass-tier objects, and the monitoring fee applies immediately to every object in scope. Always emitCONFIRM: About to <action>...and wait for explicit operator approval.
Pre-flight safety checks (run before any remediation CLI)
-
MANDATORY CONFIRMATION GATE. Before any state-changing operation (
put-bucket-intelligent-tiering-configuration,delete-bucket-intelligent-tiering-configuration,create-jobfor Batch Operations), emit:CONFIRM: About to <action> on bucket <name> in account <account> region <region>. This affects <consequence>. Proceed? (yes/no). Do NOT execute until the operator confirms. -
Capture current state for rollback. Before applying:
aws s3api list-bucket-intelligent-tiering-configurations --bucket <name> --output json > /tmp/<name>-it-config-backup-$(date +%s).json. The configuration is not versioned; a put replaces it atomically. -
Verify Object Lock posture before archive-tier recommendations. If the bucket has Object Lock in COMPLIANCE mode with a retrieval SLA, do not recommend archive tiers.
-
Verify the filter prefix matches the actual key layout. A wrong prefix is silently a no-op (or worse, scopes the configuration away from the intended objects).
-
Batch Operations IAM check.
s3control create-jobrequires a role with appropriate S3 permissions. Verify the role exists before recommending Batch.
References (load on demand)
- Worked examples - full walkthroughs: monitoring-fee rejection (negative-savings rule), already-optimal setup
- Error handling - CLI and data-source failure modes, remedies, and the rollback procedure
- Diagnostic commands - pre-flight bucket-metadata gate: pagination, CLI listing, malformed-input handling, attribute table
- Advanced patterns - Step 0 expert knowledge, edge-case handling, cross-region cost variance, 2024-2026 AWS features
- Intelligent-Tiering cost model - request fees, retrieval tiers, regional multipliers; load before dollar estimates
- Intelligent-Tiering vs lifecycle - trade-off analysis for predictable access patterns
Domain
AWS CloudOps / S3 Storage Cost Optimisation via Intelligent-Tiering.
AWS documentation
- Amazon S3 User Guide — https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html
- S3 Intelligent-Tiering — https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html
- S3 Storage Classes — https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html
- Configuring Intelligent-Tiering — https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html
- S3 Storage Lens — https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_basics_metrics.html
- S3 Batch Operations — https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops.html
- AWS CLI: s3api — https://docs.aws.amazon.com/cli/latest/reference/s3api/
04 同仓库更多 Skills
xray-tracing-deployer
Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL / method / service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry / ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS / EKS / Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.
wellarchitected-workload-auditor
Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.
wellarchitected-review-operator
Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer / get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.
wafv2-web-acl-deployer
Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB/API Gateway/CloudFront, or configuring CAPTCHA/Challenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.
wafv2-web-acl-auditor
Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow/bypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.
waf-rule-deployer
Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.