Create a production-ready, secure Amazon S3 bucket with versioning and a lifecycle policy. Use when the user asks to create an S3 bucket, enable versioning, add lifecycle rules, transition objects to Glacier or an archive tier, block public access, or encrypt a bucket. Delivers infrastructure-as-code (AWS CDK and CloudFormation) with secure defaults — Block Public Access, default encryption, a TLS-only bucket policy, versioning, and a lifecycle rule that transitions objects to Glacier after 90 days — following AWS Well-Architected best practices.
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Create an S3 bucket that is private, encrypted, versioned, and cost-managed via
lifecycle rules — defined as infrastructure-as-code. Follow the
working-with-aws guardrails.
This is the plugin's reference implementation of the Agent Toolkit example: "Create an S3 bucket with versioning enabled and a lifecycle policy that transitions objects to Glacier after 90 days."
AES256) at minimum; SSE-KMS with a CMK when
the workload needs key control or audit.aws:SecureTransport is false.BucketOwnerEnforced (ACLs disabled) unless a specific
cross-account ACL need exists.Choose the archive tier deliberately: Glacier Instant Retrieval for ms-access archives, Glacier Flexible Retrieval for minutes-to-hours, or Glacier Deep Archive for the cheapest, rarely-accessed data.
See references/versioning-and-lifecycle.md for the complete, copy-paste AWS CDK and CloudFormation templates that implement every default above. Pick one, set the bucket name (or let CDK/CFN generate it), and deploy.
cdk deployaws cloudformation deploy --template-file s3-secure.yaml --stack-name secure-bucketaws s3api get-bucket-versioning --bucket <name> returns Status: Enabled.aws s3api get-bucket-lifecycle-configuration --bucket <name> shows the
90-day Glacier transition.aws s3api get-public-access-block --bucket <name> shows all four flags true.http:// request is denied; https:// succeeds.Prefer IaC over aws s3 mb + a series of put-bucket-* calls: the template is
reviewable, repeatable, and cleanly destroyable.
c5551e1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.