Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aws avatar

Securing S3 Buckets

  • 3.2k installs
  • 2.2k repo stars
  • Updated August 4, 2026
  • aws/agent-toolkit-for-aws

securing-s3-buckets is an agent skill for

About

The securing-s3-buckets skill documents agent workflows from the repository SKILL.md. It covers you MUST inform the user if required tools are missing. Key workflows include you SHOULD confirm credentials with aws sts get-caller-identity. Implements layered S3 security controls across five workflows: securing new buckets, auditing existing configurations, remediating findings, configuring encryption, and enabling monitoring. Follows AWS Well-Architected security best practices. Execute commands using the AWS MCP server when connected sandboxed execution, audit logging, observability . Fall back to AWS CLI or shell otherwise. Developers invoke securing-s3-buckets when the task matches the triggers and reference files in SKILL.md for grounded, stepwise execution. Reference files and progressive disclosure keep context focused while preserving concrete commands, configuration fields, and validation checks copied from the upstream documentation. Reference files and progressive disclosure keep context focused while preserving concrete commands, configuration fields, and validation checks copied from the upstream documentation.

  • You MUST inform the user if required tools are missing
  • You SHOULD confirm credentials with aws sts get-caller-identity
  • You MUST ask for all required parameters upfront
  • You MUST confirm bucket name and region before any write operation
  • You MAY infer region from user context if clearly stated

Securing S3 Buckets by the numbers

  • 3,156 all-time installs (skills.sh)
  • +389 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #183 of 2,203 Security skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

securing-s3-buckets capabilities & compatibility

Capabilities
you must inform the user if required tools are m · you should confirm credentials with aws sts get · you must ask for all required parameters upfront · you must confirm bucket name and region before a · you may infer region from user context if clearl
Use cases
security audit · testing · debugging
From the docs

What securing-s3-buckets says it does

Create and secure S3 buckets following AWS best practices for access control, encryption,
SKILL.md
monitoring, and remediation of misconfigurations. Use when the user wants to
SKILL.md
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill securing-s3-buckets

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.2k
repo stars2.2k
Security audit3 / 3 scanners passed
Last updatedAugust 4, 2026
Repositoryaws/agent-toolkit-for-aws

What problem does securing-s3-buckets solve for developers using the documented workflows?

The securing-s3-buckets skill documents agent workflows from the repository SKILL.md. It covers you MUST inform the user if required tools are missing. Key workflows include you SHOULD confirm creden

Who is it for?

Developers working with securing-s3-buckets patterns described in the skill documentation.

Skip if: Skip when docs are empty or the task is outside the skill documented scope.

When should I use this skill?

Use when

What you get

Actionable securing-s3-buckets guidance grounded in SKILL.md workflows and reference files.

  • Hardened bucket policy
  • Encryption configuration
  • Logging and monitoring setup

By the numbers

  • Implements five layered S3 security workflows
  • Follows AWS Well-Architected security guidance

Files

SKILL.mdMarkdownGitHub ↗

Overview

Implements layered S3 security controls across five workflows: securing new buckets, auditing existing configurations, remediating findings, configuring encryption, and enabling monitoring. Follows AWS Well-Architected security best practices.

Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging, observability). Fall back to AWS CLI or shell otherwise.

Common Tasks

0. Verify Dependencies

Check for required tools before starting.

Constraints:

  • You MUST inform the user if required tools are missing
  • You SHOULD confirm credentials with aws sts get-caller-identity

See references/iam-permissions.md for IAM permissions by workflow.

1. Classify the Request

User intentWorkflow
Secure a new bucketA: Secure New Bucket
Audit / review existing bucketB: Audit Existing Bucket
Fix a specific findingC: Remediate Issue
Configure encryptionD: Configure Encryption
Enable logging / monitoringE: Enable Monitoring

Constraints:

  • You MUST ask for all required parameters upfront
  • You MUST confirm bucket name and region before any write operation
  • You MAY infer region from user context if clearly stated
  • You SHOULD run aws iam simulate-principal-policy to validate permissions before write operations
  • You SHOULD display write commands and wait for confirmation before executing

put-bucket-policy Safety Rules

These rules apply to ALL workflows that call put-bucket-policy:

  • You MUST attempt to retrieve the existing policy first (aws s3api get-bucket-policy) — put-bucket-policy replaces the entire policy
  • If a policy exists, you MUST back it up before modifying: aws s3api get-bucket-policy --bucket <name> --output text > backup-policy-$(date +%s).json
  • If NoSuchBucketPolicy is returned, proceed with a new policy — no backup is needed
  • You MUST merge new statements into the existing policy's Statement array (if one exists)
  • You MUST validate merged JSON syntax before applying (e.g. echo '<policy>' | python3 -m json.tool)
  • You SHOULD display the full put-bucket-policy command and wait for confirmation

2. Workflow A — Secure New Bucket

See references/workflows.md for full CLI steps.

Required steps (execute in order, do not skip):

1. Create bucket with --bucket-namespace account-regional 2. Enable versioning 3. Enable encryption (SSE-S3 + Bucket Keys + block SSE-C) 4. Enable logging (ask user which option — conditional) 5. Enforce HTTPS-only via DenyInsecureTransport bucket policy 6. Enable ABAC

Constraints:

  • You MUST pass --bucket-namespace account-regional on create-bucket call — this is REQUIRED, not optional. Example:
  aws s3api create-bucket --bucket <name> --bucket-namespace account-regional --region <region>
  • You MUST NOT change Block Public Access — S3 enables it by default on new buckets
  • You MUST NOT change ACL ownership controls — S3 disables ACLs (BucketOwnerEnforced) by default
  • You MUST apply a bucket policy with a DenyInsecureTransport statement that denies s3:* when aws:SecureTransport is false — this is REQUIRED, not optional. Example:
  aws s3api put-bucket-policy --bucket <name> --policy '{"Version":"2012-10-17","Statement":[{"Sid":"DenyInsecureTransport","Effect":"Deny","Principal":"*","Action":"s3:*","Resource":["arn:aws:s3:::<name>/*","arn:aws:s3:::<name>"],"Condition":{"Bool":{"aws:SecureTransport":"false"}}}]}'
  • You MUST ask the user which logging option they want before step 4
  • You MUST follow the put-bucket-policy safety rules for steps 4 and 5
  • You SHOULD confirm each step succeeded before proceeding

3. Workflow B — Audit Existing Bucket

See references/audit-checklist.md for the full checklist.

Constraints:

  • You MUST run all read-only audit commands before reporting findings
  • You MUST NOT execute any write or modify commands during an audit
  • You MUST report each control as PASS / FAIL / NOT CONFIGURED with severity
  • For logging: report PASS if either S3 server access logging OR CloudTrail data events are enabled; NOT CONFIGURED only if neither

4. Workflow C — Remediate Issue

See references/remediation.md for fix commands by issue type.

Constraints:

  • You MUST identify the issue type before applying any fix
  • You MUST follow the put-bucket-policy safety rules when modifying policies
  • You MUST re-run the relevant audit check after applying the fix to confirm resolution

5. Workflow D — Configure Encryption

See references/encryption.md for encryption options and commands.

Constraints:

  • You MUST default to SSE-S3 with S3 Bucket Keys and SSE-C blocked unless the user explicitly requests KMS
  • When using SSE-KMS, you MUST use a customer managed key — NEVER the AWS managed aws/s3 key
  • You MUST specify customer-managed KMS keys by full ARN, not alias
  • You MUST include BucketKeyEnabled: true and BlockedEncryptionTypes: [SSE-C] in all configurations
  • Note: The S3 API accepts aws/s3 and aliases without error — agent-enforced constraints. Verify with get-bucket-encryption after applying.

6. Workflow E — Enable Monitoring

See references/workflows.md for full CLI steps.

Constraints:

  • You MUST check whether a GuardDuty detector already exists before creating one
  • You MUST use the trail's home region (not the bucket's region) for CloudTrail commands
  • You SHOULD enable all four core recommended AWS Config rules

Troubleshooting

`ObjectLockConfigurationNotFoundError` — Object Lock is not enabled. Treat as NOT CONFIGURED, not a failure.

`AccessDenied` on audit commands — Check IAM policy, bucket policy, Block Public Access, VPC endpoint policy, and SCPs/RCPs. Use aws iam simulate-principal-policy to diagnose.

`put-bucket-policy` silently removes existing statements — See put-bucket-policy safety rules.

GuardDuty `BadRequestException: detector already exists` — Run aws guardduty list-detectors first; only call create-detector if empty.

CloudTrail changes not taking effect — Verify you are using --region <trail-home-region>, not the bucket's region. Find it with aws cloudtrail describe-trails --query 'trailList[*].[Name,HomeRegion]'.

Additional Resources

  • references/iam-permissions.md — IAM permissions by workflow
  • references/audit-checklist.md — Per-control checklist with severity and pass conditions
  • references/encryption.md — Encryption options, KMS guidance, SSE-C blocking
  • references/remediation.md — Fix commands for common findings
  • references/workflows.md — Full CLI command sequences for Workflows A and E
  • AWS S3 Security Best Practices
  • AWS Well-Architected Security Pillar

Related skills

How it compares

Choose securing-s3-buckets over generic AWS CLI guides when you need a structured audit-and-remediate workflow rather than ad-hoc bucket commands.

FAQ

Who is securing-s3-buckets for?

Developers and software engineers working with securing-s3-buckets patterns described in the skill documentation.

When should I use securing-s3-buckets?

When .

Is securing-s3-buckets safe to install?

Review the Security Audits panel on this page before installing in production.

Securityappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.