home / skills / jeremylongshore / claude-code-plugins-plus-skills / s3-lifecycle-config

s3-lifecycle-config skill

/skills/13-aws-skills/s3-lifecycle-config

This skill helps you configure s3 lifecycle settings with step-by-step guidance, producing production-ready configurations and validation against best

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill s3-lifecycle-config

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.1 KB
---
name: "s3-lifecycle-config"
description: |
  Configure s3 lifecycle config operations. Auto-activating skill for AWS Skills.
  Triggers on: s3 lifecycle config, s3 lifecycle config
  Part of the AWS Skills skill category. Use when configuring systems or services. Trigger with phrases like "s3 lifecycle config", "s3 config", "s3".
allowed-tools: "Read, Write, Edit, Bash(aws:*)"
version: 1.0.0
license: MIT
author: "Jeremy Longshore <[email protected]>"
---

# S3 Lifecycle Config

## Overview

This skill provides automated assistance for s3 lifecycle config tasks within the AWS Skills domain.

## When to Use

This skill activates automatically when you:
- Mention "s3 lifecycle config" in your request
- Ask about s3 lifecycle config patterns or best practices
- Need help with amazon web services skills covering compute, storage, networking, serverless, and aws-specific best practices.

## Instructions

1. Provides step-by-step guidance for s3 lifecycle config
2. Follows industry best practices and patterns
3. Generates production-ready code and configurations
4. Validates outputs against common standards

## Examples

**Example: Basic Usage**
Request: "Help me with s3 lifecycle config"
Result: Provides step-by-step guidance and generates appropriate configurations


## Prerequisites

- Relevant development environment configured
- Access to necessary tools and services
- Basic understanding of aws skills concepts


## Output

- Generated configurations and code
- Best practice recommendations
- Validation results


## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| Configuration invalid | Missing required fields | Check documentation for required parameters |
| Tool not found | Dependency not installed | Install required tools per prerequisites |
| Permission denied | Insufficient access | Verify credentials and permissions |


## Resources

- Official documentation for related tools
- Best practices guides
- Community examples and tutorials

## Related Skills

Part of the **AWS Skills** skill category.
Tags: aws, lambda, s3, ec2, cloudformation

Overview

This skill automates creation, validation, and guidance for Amazon S3 lifecycle configurations. It helps you design rules to transition, expire, or clean up objects using production-ready examples and AWS best practices. The skill is auto-activating within the AWS Skills category when you ask about S3 lifecycle config.

How this skill works

It analyzes your stated retention, transition, and versioning requirements and generates lifecycle rules in JSON or YAML suitable for S3, CloudFormation, or Terraform. The skill validates required fields, flags common permission and syntax issues, and offers step-by-step changes you can apply to buckets safely. Outputs include example policies, CLI commands, and notes about effects on versioned objects and Glacier/Intelligent-Tiering transitions.

When to use it

  • You need to automate object transition to cheaper storage classes (Standard→Infrequent→Glacier).
  • You want to set up automatic object expiry and cleanup to control storage costs.
  • You must implement lifecycle rules for versioned buckets and noncurrent versions.
  • You are preparing CloudFormation or Terraform templates that include S3 lifecycle rules.
  • You need validation and permission checks before applying lifecycle changes.

Best practices

  • Define clear retention and transition goals before creating rules to avoid accidental data loss.
  • Test lifecycle rules on a staging bucket or prefix to observe behavior before production rollout.
  • Include explicit filter prefixes or tags to limit rule scope and reduce risk.
  • Handle versioning separately: define noncurrent version actions to avoid unexpected deletions.
  • Monitor lifecycle effects and set alarms for unexpected increases in delete or transition events.

Example use cases

  • Generate a JSON lifecycle policy to move logs to Intelligent-Tiering after 30 days and to Glacier after 365 days.
  • Create CloudFormation snippet that applies expiration to a specific prefix while preserving current versions.
  • Validate an existing bucket lifecycle policy and report missing required fields or permission gaps.
  • Produce CLI commands to apply a lifecycle config and to simulate the effect on a sample object set.
  • Recommend tag-based lifecycle strategy for multi-tenant buckets to isolate tenant retention policies.

FAQ

Will lifecycle rules immediately delete objects?

No. Rules act on object age or lifecycle state; configured actions occur after the specified number of days and are not instantaneous.

How do lifecycle rules interact with versioning?

You must explicitly define actions for current and noncurrent versions. Deleting noncurrent versions requires separate noncurrentVersionExpiration rules to avoid removing live data.