[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ABQKZ9PG9QG8VJSASW49DB":3,"skill-same:01M7ABQKZ9PG9QG8VJSASW49DB":142},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7ABQKZ9PG9QG8VJSASW49DB","s3-bucket-policy-deployer",null,"Provisions S3 bucket policies with production defaults: policy structure (Principal, Action, Resource, Condition), common patterns (HTTPS-only via aws:SecureTransport Deny, cross-account with external ID, VPC-endpoint-only via aws:SourceVpce, CloudFront Origin Access Control, AWS service access), policy vs ACL (policy preferred — ACLs are legacy), 20 KB policy size limit, condition keys (aws:SourceIp, aws:SourceVpc, aws:SourceVpce, s3:x-amz-acl, aws:SecureTransport), S3 Access Points policy delegation, S3 Multi-Region Access Point (MRAP) policy. Emits a READY_TO_DEPLOY checklist with verification commands. Use when attaching a bucket policy, enforcing HTTPS-only, restricting to a VPC endpoint, granting CloudFront OAC, or delegating via Access Points. Triggers: S3 bucket policy, put-bucket-policy, aws:SecureTransport, cross-account S3, VPC endpoint only, S3 CloudFront OAC, S3 Access Points delegation, MRAP policy.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: s3-bucket-policy-deployer\ndescription: 'Provisions S3 bucket policies with production defaults: policy structure (Principal, Action, Resource, Condition), common patterns (HTTPS-only via aws:SecureTransport Deny, cross-account with external ID, VPC-endpoint-only via aws:SourceVpce, CloudFront Origin Access Control, AWS service access), policy vs ACL (policy preferred — ACLs are legacy), 20 KB policy size limit, condition keys (aws:SourceIp, aws:SourceVpc, aws:SourceVpce, s3:x-amz-acl, aws:SecureTransport), S3 Access Points policy delegation, S3 Multi-Region Access Point (MRAP) policy. Emits a READY_TO_DEPLOY checklist with verification commands. Use when attaching a bucket policy, enforcing HTTPS-only, restricting to a VPC endpoint, granting CloudFront OAC, or delegating via Access Points. Triggers: S3 bucket policy, put-bucket-policy, aws:SecureTransport, cross-account S3, VPC endpoint only, S3 CloudFront OAC, S3 Access Points delegation, MRAP policy.'\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Live provisioning uses AWS CLI v2 with s3api (put-bucket-policy, get-bucket-policy, delete-bucket-policy), s3control (put-access-point-policy, put-multi-region-access-point-policy), cloudfront (get-origin-access-control). Works with Terraform aws_s3_bucket_policy and CloudFormation AWS::S3::BucketPolicy.\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '1'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Storage\n  task_type: deploy\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  tags: aws, s3, bucket-policy, cloudfront-oac, vpc-endpoint, cloudops, deploy, storage\n  dependencies: aws-orchestrator\n  keywords: aws, s3, bucket policy, aws:SecureTransport, cross-account, vpc endpoint, aws:SourceVpce, aws:SourceVpc, aws:SourceIp, cloudfront oac, origin access control, s3:x-amz-acl, access points delegation, mrap policy, policy size limit, cloudops, deploy\n  when_to_use: 'Invoke when the user wants to attach or replace an S3 bucket policy: enforcing HTTPS-only access (aws:SecureTransport Deny), granting cross-account access with conditions, restricting to a VPC endpoint (aws:SourceVpce), configuring CloudFront Origin Access Control (OAC), granting AWS service access, delegating via S3 Access Points, or configuring a Multi-Region Access Point policy. Do NOT invoke for bucket-level hardening without a policy (use s3-secure-bucket-deployer), for access point creation (use s3-access-points-deployer), for S3 ACLs (legacy — policies are preferred), or for auditing existing policies (use s3-public-access-auditor).'\n---\n\n# S3 Bucket Policy Deployer\n\nAn AWS CloudOps agent skill that provisions S3 bucket policies with\ncorrect security defaults. The skill walks the operator through\npolicy structure validation, common access patterns (HTTPS-only,\ncross-account, VPC-endpoint-only, CloudFront-OAC, service-access),\ncondition key selection, the 20 KB policy size limit, Access Points\npolicy delegation, and MRAP policies. It captures each policy\ndecision, explains why each default matters, and emits a\nREADY_TO_DEPLOY checklist with copy-pasteable verification commands.\n\n## Activation keywords\n\nS3 bucket policy, put-bucket-policy, aws:SecureTransport, HTTPS-only\nS3, cross-account S3 access, VPC endpoint only S3, aws:SourceVpce,\naws:SourceVpc, aws:SourceIp, s3:x-amz-acl, CloudFront OAC, Origin\nAccess Control, AWS service access, S3 Access Points delegation,\nMRAP policy, Multi-Region Access Point policy, policy size limit,\n20 KB bucket policy.\n\n## STRICT output contract\n\nWhen this skill is invoked with a bucket-policy provisioning\nrequest (a bucket name, access pattern, or a partial policy), the\nagent MUST respond with the READY_TO_DEPLOY checklist defined in\nthe \"Output format\" section using the literal all-caps labels\n`BUCKET_POLICY:`, `VERDICT:`, `CHECKLIST:`, and\n`VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,\nheadings, or disclaimers — emit the block as the first lines of the\nresponse. This contract is what assertion-based evals and downstream\nprovisioning pipelines rely on; deviating from the literal labels\nbreaks automation silently.\n\nIf any prerequisite is missing, the verdict is\n`PREREQUISITES_MISSING` with a specific gap citation in the\nchecklist (marked `[✗]`), and `READY_TO_DEPLOY` MUST NOT also\nappear.\n\n## Quick navigation\n\n| Section | When to read |\n|---|---|\n| Prerequisites | Always — verify before provisioning |\n| Step 1 — Policy structure | Principal, Action, Resource, Condition |\n| Step 2 — HTTPS-only (aws:SecureTransport) | Enforce TLS |\n| Step 3 — Cross-account access | Grant another account |\n| Step 4 — VPC-endpoint-only (aws:SourceVpce) | Private network |\n| Step 5 — CloudFront OAC | CDN origin |\n| Step 6 — AWS service access | Lambda, KMS, logging |\n| Step 7 — Policy vs ACL | Policy preferred |\n| Step 8 — 20 KB size limit | Large policies |\n| Step 9 — Access Points delegation | Per-team policies |\n| Step 10 — MRAP policy | Multi-region |\n| Step 11 — Recent features | Latest |\n| NEVER do these things | Review before signing off |\n| Output format | The literal checklist template |\n| references\u002Fpolicy-patterns.md | Pattern deep dive |\n| references\u002Fprovisioning-cli-commands.md | Copy-pasteable CLI |\n\n## Mindset\n\n**One-line takeaway:** A bucket policy is a JSON access-control\ndocument attached directly to an S3 bucket. It is evaluated\nalongside the IAM policy of the caller — effective permission is\nthe intersection. Bucket policies are the primary mechanism for\ncross-account access, network-source restrictions, and enforcing\nTLS; ACLs are legacy and should not be used.\n\nThe three misconceptions in full (bucket policy vs IAM policy override, `Principal: *` + Condition scoping, ACLs vs policies): [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Configuration dependency graph (novel heuristic)\n\nBucket-policy configurations are NOT independent. Many silently\nno-op without their prerequisite; others conflict with each other.\nUse this graph to sequence provisioning and debug \"why is my policy\nnot taking effect?\" later.\n\n| Configuration | Hard dependencies (API error without) | Silent failure \u002F immutability | Enables downstream |\n|---|---|---|---|\n| Bucket policy | bucket exists; policy is valid JSON \u003C 20 KB | **policy > 20 KB is rejected by put-bucket-policy** with `MalformedPolicy` | access control |\n| `Principal: *` + Condition | valid condition key | **`Principal: *` with `aws:SourceVpce` still allows any identity in the VPC** — not identity-scoped | network-source restriction |\n| `aws:SecureTransport: false` Deny | n\u002Fa | **Deny without `Bool` operator using `StringNotEquals` silently matches wrong values** — use `Bool` | HTTPS enforcement |\n| `aws:SourceVpce` condition | VPC endpoint exists | **wrong endpoint ID silently blocks ALL traffic** or allows ALL if negated incorrectly | VPC-only access |\n| `aws:SourceVpc` condition | request comes through a VPC endpoint with private DNS | **requests NOT through a VPC endpoint do not have `aws:SourceVpc` set** — condition silently does not match | VPC-scoped access |\n| `aws:SourceIp` condition | valid CIDR | **`aws:SourceIp` is NOT populated for requests through a NAT gateway in some configs** — use `aws:SourceVpc` or `aws:SourceVpce` for VPC traffic | IP-based restriction |\n| CloudFront OAC | OAC config exists in CloudFront | **legacy OAI (Origin Access Identity) and OAC are different** — OAC policy with an OAI principal silently fails | CDN origin access |\n| Block Public Access | n\u002Fa | **BPA `RestrictPublicBuckets` silently blocks public policies even if the policy allows them** — BPA is a guardrail above the policy | public-access guardrail |\n| Access Points delegation | access points exist | **bucket policy is still evaluated cumulatively with AP policy** — a Deny in the bucket policy cannot be overridden by the AP policy | per-team scoping |\n| MRAP policy | MRAP exists | **MRAP policy and bucket policy are separate documents** — MRAP policy does not replace bucket policy | multi-region access |\n\n**The `aws:SecureTransport` and `aws:SourceVpce` rows are the ones\na baseline model misses.** Using `StringNotEquals` instead of `Bool`\nfor SecureTransport, and using `aws:SourceVpc` for non-endpoint\ntraffic, both produce policies that look correct but silently match\nthe wrong condition. The procedure below forces the correct\ncondition operator for each pattern.\n\n**Cross-dependency gotchas:**\n- A bucket policy with `Effect: Deny` CANNOT be overridden by any\n  IAM Allow. Deny wins in all cases. This is why overly broad Deny\n  statements are dangerous.\n- `Principal: *` makes the policy public — it allows any AWS\n  identity (including from other accounts) subject to conditions.\n  Always pair with conditions for non-public buckets.\n- Block Public Access (BPA) at the bucket or account level is a\n  guardrail ABOVE the policy. If BPA `RestrictPublicBuckets` is on,\n  a policy with `Principal: *` is silently blocked even if the\n  policy explicitly allows it.\n\n## Expert heuristic: the aws:SecureTransport condition operator\n\nThe aws:SecureTransport operator deep dive (correct `Bool` vs wrong `StringNotEquals`, why, complete HTTPS-only Deny, key implication): [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Expert heuristic: aws:SourceVpce vs aws:SourceVpc vs aws:SourceIp\n\nThe aws:SourceVpce vs aws:SourceVpc vs aws:SourceIp comparison table, the endpoint-only-population gotcha, the correct VPC-endpoint-only pattern, and the SourceIp-through-endpoint caveat: [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Expert heuristic: policy vs ACL — policy always preferred\n\nThe policy-vs-ACL comparison table and the `BucketOwnerEnforced` production default: [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Prerequisites (verify before provisioning)\n\nBefore emitting provisioning commands, verify these prerequisites.\nIf any are missing, the verdict is **PREREQUISITES_MISSING** with a\nspecific gap citation.\n\n| Prerequisite | How to verify |\n|---|---|\n| Bucket exists | `aws s3api head-bucket --bucket \u003Cname>` |\n| Account ID | `aws sts get-caller-identity --query Account` |\n| Policy JSON valid | `python3 -m json.tool policy.json` |\n| Policy size \u003C 20 KB | `wc -c policy.json` |\n| VPC endpoint ID (if using aws:SourceVpce) | `aws ec2 describe-vpc-endpoints --vpc-endpoint-ids \u003Cid>` |\n| CloudFront OAC config (if using OAC) | `aws cloudfront get-origin-access-control --id \u003Cid>` |\n| Block Public Access posture | `aws s3api get-public-access-block --bucket \u003Cname>` |\n| Object ownership (BucketOwnerEnforced) | `aws s3api get-bucket-ownership-controls --bucket \u003Cname>` |\n\nIf any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`\nand cite the specific gap.\n\n## Step 1 — Policy structure (Principal, Action, Resource, Condition)\n\nEvery bucket policy is a JSON document with a `Version` and a\n`Statement` array. Each statement has four core elements.\n\nCanonical four-element policy JSON example: [references\u002Fpolicy-patterns.md](references\u002Fpolicy-patterns.md).\n\n**Element rules:**\n- **Version:** always `\"2012-10-17\"` (NOT `2008-10-17` — the older\n  version lacks support for policy variables).\n- **Effect:** `Allow` or `Deny`. Deny overrides any Allow.\n- **Principal:** the identity being granted\u002Fdenied access. Use a\n  specific ARN for identity-scoped access. Use `\"*\"` for everyone\n  (public) — always pair with a Condition.\n- **Action:** S3 actions (`s3:GetObject`, `s3:PutObject`,\n  `s3:ListBucket`, etc.). Use fully-qualified names.\n- **Resource:** the bucket ARN (`arn:aws:s3:::my-bucket`) for\n  bucket-level actions and object ARN (`arn:aws:s3:::my-bucket\u002F*`)\n  for object-level actions. List both for policies that cover both.\n- **Condition:** optional. See the expert heuristics for\n  `aws:SecureTransport`, `aws:SourceVpce`, `aws:SourceVpc`.\n\n**Common mistake:** listing only the bucket ARN (`arn:aws:s3:::bucket`)\nbut omitting the object ARN (`arn:aws:s3:::bucket\u002F*`). Bucket-level\nactions (`s3:ListBucket`) use the bucket ARN; object-level actions\n(`s3:GetObject`, `s3:PutObject`) use the object ARN. A policy with\nonly the bucket ARN will deny all object operations.\n\n## Step 2 — HTTPS-only (aws:SecureTransport)\n\nSee the \"Expert heuristic: the aws:SecureTransport condition\noperator\" section. The canonical HTTPS-only Deny — **always use\n`Bool`, never `StringNotEquals`:**\n\n```json\n{\n  \"Sid\": \"DenyInsecureTransport\",\n  \"Effect\": \"Deny\",\n  \"Principal\": \"*\",\n  \"Action\": \"s3:*\",\n  \"Resource\": [\"arn:aws:s3:::my-bucket\", \"arn:aws:s3:::my-bucket\u002F*\"],\n  \"Condition\": { \"Bool\": { \"aws:SecureTransport\": \"false\" } }\n}\n```\n\n## Step 3 — Cross-account access\n\nTo grant another account access, use the foreign account's role ARN\nas Principal. Both sides must allow (bucket policy AND the foreign\nrole's IAM policy).\n\n```json\n{\n  \"Sid\": \"AllowCrossAccountRead\",\n  \"Effect\": \"Allow\",\n  \"Principal\": { \"AWS\": \"arn:aws:iam::998877665544:role\u002FPartnerRole\" },\n  \"Action\": [\"s3:GetObject\", \"s3:ListBucket\"],\n  \"Resource\": [\"arn:aws:s3:::my-bucket\", \"arn:aws:s3:::my-bucket\u002Fshared\u002F*\"],\n  \"Condition\": { \"StringEquals\": { \"aws:ExternalId\": \"unique-external-id\" } }\n}\n```\n\n**Key rules:** use `aws:ExternalId` for third-party access (prevents\nconfused-deputy). Scope `Resource` to specific prefixes when\npossible. **Common mistake:** granting `:root` instead of a specific\nrole ARN — `:root` delegates to the ENTIRE foreign account.\n\n## Step 4 — VPC-endpoint-only (aws:SourceVpce)\n\nSee the \"Expert heuristic: aws:SourceVpce vs aws:SourceVpc vs\naws:SourceIp\" section. The VPC-endpoint-only Deny:\n\n```json\n{\n  \"Sid\": \"DenyNotFromVpcEndpoint\",\n  \"Effect\": \"Deny\",\n  \"Principal\": \"*\",\n  \"Action\": \"s3:*\",\n  \"Resource\": [\"arn:aws:s3:::my-bucket\", \"arn:aws:s3:::my-bucket\u002F*\"],\n  \"Condition\": { \"StringNotEquals\": { \"aws:SourceVpce\": \"vpce-0abc123def456\" } }\n}\n```\n\n**Key rule:** this Deny blocks ALL traffic not from the specified\nVPC endpoint. Verify the endpoint ID before applying — a wrong ID\nblocks all access.\n\n## Step 5 — CloudFront Origin Access Control (OAC)\n\nCloudFront OAC is the successor to the legacy Origin Access\nIdentity (OAI). OAC supports SSE-KMS and all CloudFront features.\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllowCloudFrontServicePrincipalReadOnly\",\n      \"Effect\": \"Allow\",\n      \"Principal\": { \"Service\": \"cloudfront.amazonaws.com\" },\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::my-bucket\u002F*\",\n      \"Condition\": {\n        \"StringEquals\": {\n          \"AWS:SourceArn\": \"arn:aws:cloudfront::123456789012:distribution\u002FE123ABCDEF456\"\n        }\n      }\n    }\n  ]\n}\n```\n\n**Key rules:**\n- Use `Principal: { \"Service\": \"cloudfront.amazonaws.com\" }` (not\n  the OAI canonical user ID).\n- The `AWS:SourceArn` condition restricts access to a specific\n  CloudFront distribution. Without it, ANY CloudFront distribution\n  in the account can access the bucket.\n- OAC supports SSE-KMS (OAI did not).\n- The OAC configuration must exist in CloudFront first\n  (`create-origin-access-control`).\n\n**Common mistake:** using the legacy OAI principal (canonical user\nID `c4c1ede66af53448b93e28bd014fbedd65`) instead of the OAC\nservice principal. OAI is legacy; always use OAC.\n\n## Step 6 — AWS service access\n\nTo grant an AWS service (Lambda, KMS, Config, logging) access to a\nbucket, use the service principal with a condition.\n\n```json\n{\n  \"Sid\": \"AllowLambdaLogging\",\n  \"Effect\": \"Allow\",\n  \"Principal\": { \"Service\": \"logging.amazonaws.com\" },\n  \"Action\": \"s3:PutObject\",\n  \"Resource\": \"arn:aws:s3:::my-bucket\u002Flogs\u002F*\",\n  \"Condition\": {\n    \"StringEquals\": { \"s3:x-amz-acl\": \"bucket-owner-full-control\" }\n  }\n}\n```\n\n**Key rule:** `s3:x-amz-acl: bucket-owner-full-control` ensures the\nbucket owner (not the writing service) owns the objects — critical\nfor cross-account logging. Without it, the service account owns\nthe objects and the bucket account cannot read them.\n\n## Step 7 — Policy vs ACL (policy preferred)\n\nSee the \"Expert heuristic: policy vs ACL\" section. Production\ndefault: disable ACLs with `BucketOwnerEnforced` ownership:\n\nDisable-ACLs CLI (`put-bucket-ownership-controls` with `BucketOwnerEnforced`): [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md).\n\nThis disables ACLs entirely — all access control flows through\nbucket policies and IAM.\n\n## Step 8 — 20 KB policy size limit\n\nS3 bucket policies have a maximum size of 20 KB. Policies exceeding\nthis limit are rejected by `put-bucket-policy` with\n`MalformedPolicy`.\n\n**Mitigations for large policies:**\n\n| Strategy | When to use |\n|---|---|\n| Use wildcard prefixes | When many prefixes share the same access pattern |\n| Use S3 Access Points | When different teams need different policies on the same bucket |\n| Use IAM policies instead | When the policy grants access to specific roles (not cross-account) |\n| Reduce statement count | Merge similar statements with multi-action \u002F multi-resource arrays |\n\nPolicy-size verification commands (`wc -c`, 20 KB limit): [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md).\n\n**Common mistake:** adding a statement per team\u002Fdepartment until\nthe policy exceeds 20 KB. Use Access Points (Step 9) to delegate\nper-team policies instead of cramming everything into one bucket\npolicy.\n\n## Step 9 — Access Points policy delegation\n\nS3 Access Points allow attaching separate policies to named entry\npoints on a bucket. Each access point has its own policy, evaluated\nalongside (not instead of) the bucket policy. Use Access Points to\navoid exceeding the 20 KB bucket-policy limit with per-team rules.\n\n```bash\naws s3control put-access-point-policy \\\n  --account-id 123456789012 \\\n  --name team-a-ap \\\n  --policy file:\u002F\u002Fap-policy.json\n```\n\nThe access point policy uses the access point ARN (not the bucket\nARN) as the resource:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Principal\": { \"AWS\": \"arn:aws:iam::123456789012:role\u002FTeamARole\" },\n    \"Action\": [\"s3:GetObject\", \"s3:PutObject\"],\n    \"Resource\": \"arn:aws:s3:us-east-1:123456789012:accesspoint\u002Fteam-a-ap\u002Fteam-a\u002F*\"\n  }]\n}\n```\n\n**Key rule:** the bucket policy is still evaluated. A Deny in the\nbucket policy cannot be overridden by the AP policy. See\n`s3-access-points-deployer` for the full access point procedure.\n\n## Step 10 — MRAP policy\n\nA Multi-Region Access Point (MRAP) has its own policy, separate\nfrom the underlying bucket policies.\n\n```bash\naws s3control put-multi-region-access-point-policy \\\n  --account-id 123456789012 \\\n  --details Name=my-mrap,Policy=file:\u002F\u002Fmrap-policy.json\n```\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Principal\": { \"AWS\": \"arn:aws:iam::123456789012:role\u002FGlobalApp\" },\n    \"Action\": [\"s3:GetObject\", \"s3:PutObject\"],\n    \"Resource\": \"arn:aws:s3::123456789012:accesspoint\u002Fmy-mrap\"\n  }]\n}\n```\n\n**Key rules:** MRAP ARN format differs — `arn:aws:s3::account:accesspoint\u002Fname`\n(no region). MRAP policy does NOT replace bucket policies. MRAP\nroutes to nearest region; pre-existing objects NOT backfilled.\n\n## Step 11 — Recent features\n\nRecent AWS features detail (CloudFront OAC, BucketOwnerEnforced, Access Points delegation, MRAP policies, SourceVpc\u002FSourceVpce, Batch Operations for ACL migration): [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## NEVER do these things\n\n1. **NEVER use `StringNotEquals` for `aws:SecureTransport`.** Use\n   the `Bool` operator instead. `aws:SecureTransport` is a boolean\n   key; `Bool` evaluates it canonically. `StringNotEquals` is\n   fragile and can silently fail on edge-case clients. The\n   correct pattern is `\"Bool\": { \"aws:SecureTransport\": \"false\" }`\n   in a Deny statement.\n\n2. **NEVER use S3 ACLs for access control.** ACLs are legacy,\n   limited to 100 grants, cannot express conditions, and are\n   ignored when Block Public Access is enabled. Always use bucket\n   policies. Disable ACLs with `BucketOwnerEnforced` ownership.\n\n3. **NEVER use `aws:SourceIp` for VPC-endpoint traffic.** The\n   source IP becomes the endpoint's internal IP, not the client's.\n   For VPC-based restrictions, use `aws:SourceVpce` (specific\n   endpoint) or `aws:SourceVpc` (VPC-scoped). `aws:SourceIp` only\n   works for direct internet requests.\n\n4. **NEVER omit the object ARN (`arn:aws:s3:::bucket\u002F*`) from the\n   Resource list.** Bucket-level actions (`s3:ListBucket`) use the\n   bucket ARN; object-level actions (`s3:GetObject`,\n   `s3:PutObject`) use the object ARN. A policy with only the\n   bucket ARN silently denies all object operations.\n\n5. **NEVER use the legacy CloudFront OAI canonical user ID as the\n   Principal.** OAI is legacy and does not support SSE-KMS. Always\n   use OAC with `Principal: { \"Service\": \"cloudfront.amazonaws.com\" }`\n   and `AWS:SourceArn` condition.\n\n## Output format\n\n```text\nBUCKET_POLICY: \u003Cbucket-name> (\u003Cn> statements, \u003Csize> KB)\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nCHECKLIST:\n  [✓|✗] Bucket exists: \u003Cname>\n  [✓|✗] Policy version: 2012-10-17\n  [✓|✗] Policy size: \u003Cn> KB (\u003C 20 KB limit)\n  [✓|✗] HTTPS-only (aws:SecureTransport Deny with Bool): present | not needed\n  [✓|✗] Cross-account: \u003Caccount-id> (\u003Crole-arn>, external-id: \u003Cid>)\n  [✓|✗] VPC-endpoint-only (aws:SourceVpce): vpce-\u003Cid> | not needed\n  [✓|✗] CloudFront OAC: distribution \u003Carn> | not needed\n  [✓|✗] Service access: \u003Cservice> (s3:x-amz-acl: bucket-owner-full-control)\n  [✓|✗] ACLs disabled: BucketOwnerEnforced\n  [✓|✗] Block Public Access: all 4 settings True\n  [✓|✗] Access Points delegation: \u003Cn> APs | none\n  [✓|✗] MRAP policy: \u003Cmrap-name> | none\nVERIFICATION_COMMANDS:\n  aws s3api get-bucket-policy --bucket \u003Cname>\n  aws s3api get-public-access-block --bucket \u003Cname>\n  aws s3api get-bucket-ownership-controls --bucket \u003Cname>\n```\n\n### Worked example — HTTPS-only + cross-account + CloudFront OAC\n\n```text\nBUCKET_POLICY: prod-shared-data (3 statements, 1.8 KB)\nVERDICT: READY_TO_DEPLOY\nCHECKLIST:\n  [✓] Bucket exists: prod-shared-data\n  [✓] Policy version: 2012-10-17\n  [✓] Policy size: 1.8 KB (\u003C 20 KB limit)\n  [✓] HTTPS-only (aws:SecureTransport Deny with Bool): present\n  [✓] Cross-account: 998877665544 (arn:aws:iam::998877665544:role\u002FPartnerRole, external-id: partner-ext-123)\n  [✓] CloudFront OAC: distribution arn:aws:cloudfront::123456789012:distribution\u002FE123ABCDEF456\n  [✓] ACLs disabled: BucketOwnerEnforced\n  [✓] Block Public Access: all 4 settings True\nVERIFICATION_COMMANDS:\n  aws s3api get-bucket-policy --bucket prod-shared-data\n  aws s3api get-public-access-block --bucket prod-shared-data\n  aws s3api get-bucket-ownership-controls --bucket prod-shared-data\n  aws cloudfront get-origin-access-control --id E123ABCDEF456\n```\n\n## Error handling\n\nAll five failure scenarios (`MalformedPolicy`, applied-but-denied, SourceVpce not matching, CloudFront OAC 403, cross-account denied despite policy): [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\n\n## References (load on demand)\n\n- [Advanced patterns](references\u002Fadvanced-patterns.md) — the three Mindset misconceptions, the aws:SecureTransport \u002F SourceVpce-vs-SourceVpc-vs-SourceIp \u002F policy-vs-ACL expert heuristics, recent AWS features\n- [Error handling](references\u002Ferror-handling.md) — put-bucket-policy failure scenarios and their diagnosis\n- [Policy patterns](references\u002Fpolicy-patterns.md) — pattern comparison, per-pattern JSON, canonical policy-structure example\n- [Provisioning CLI commands](references\u002Fprovisioning-cli-commands.md) — full copy-pasteable CLI sequence, Terraform equivalent\n\n## Domain\n\nAWS CloudOps \u002F S3 Bucket Policy Provisioning & Storage Access\nControl Management.\n\n## AWS documentation\n\n- **Bucket policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Fbucket-policies.html\n- **Policy conditions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Famazon-s3-policy-keys.html\n- **aws:SecureTransport** — https:\u002F\u002Fdocs.aws.amazon.com\u002FIAM\u002Flatest\u002FUserGuide\u002Freference_policies_condition-keys.html#condition-keys-securetransport\n- **CloudFront OAC** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fprivate-content-restricting-access-to-s3.html\n- **Object Ownership** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Fabout-object-ownership.html\n- **Access Points policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Faccess-points-policies.html\n- **MRAP policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002FMrapPolicy.html\n- **Block Public Access** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Faccess-control-block-public-access.html\n","# S3 Bucket Policy Deployer\n\nAn AWS CloudOps agent skill that provisions S3 bucket policies with\ncorrect security defaults. The skill walks the operator through\npolicy structure validation, common access patterns (HTTPS-only,\ncross-account, VPC-endpoint-only, CloudFront-OAC, service-access),\ncondition key selection, the 20 KB policy size limit, Access Points\npolicy delegation, and MRAP policies. It captures each policy\ndecision, explains why each default matters, and emits a\nREADY_TO_DEPLOY checklist with copy-pasteable verification commands.\n\n## Activation keywords\n\nS3 bucket policy, put-bucket-policy, aws:SecureTransport, HTTPS-only\nS3, cross-account S3 access, VPC endpoint only S3, aws:SourceVpce,\naws:SourceVpc, aws:SourceIp, s3:x-amz-acl, CloudFront OAC, Origin\nAccess Control, AWS service access, S3 Access Points delegation,\nMRAP policy, Multi-Region Access Point policy, policy size limit,\n20 KB bucket policy.\n\n## STRICT output contract\n\nWhen this skill is invoked with a bucket-policy provisioning\nrequest (a bucket name, access pattern, or a partial policy), the\nagent MUST respond with the READY_TO_DEPLOY checklist defined in\nthe \"Output format\" section using the literal all-caps labels\n`BUCKET_POLICY:`, `VERDICT:`, `CHECKLIST:`, and\n`VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,\nheadings, or disclaimers — emit the block as the first lines of the\nresponse. This contract is what assertion-based evals and downstream\nprovisioning pipelines rely on; deviating from the literal labels\nbreaks automation silently.\n\nIf any prerequisite is missing, the verdict is\n`PREREQUISITES_MISSING` with a specific gap citation in the\nchecklist (marked `[✗]`), and `READY_TO_DEPLOY` MUST NOT also\nappear.\n\n## Quick navigation\n\n| Section | When to read |\n|---|---|\n| Prerequisites | Always — verify before provisioning |\n| Step 1 — Policy structure | Principal, Action, Resource, Condition |\n| Step 2 — HTTPS-only (aws:SecureTransport) | Enforce TLS |\n| Step 3 — Cross-account access | Grant another account |\n| Step 4 — VPC-endpoint-only (aws:SourceVpce) | Private network |\n| Step 5 — CloudFront OAC | CDN origin |\n| Step 6 — AWS service access | Lambda, KMS, logging |\n| Step 7 — Policy vs ACL | Policy preferred |\n| Step 8 — 20 KB size limit | Large policies |\n| Step 9 — Access Points delegation | Per-team policies |\n| Step 10 — MRAP policy | Multi-region |\n| Step 11 — Recent features | Latest |\n| NEVER do these things | Review before signing off |\n| Output format | The literal checklist template |\n| references\u002Fpolicy-patterns.md | Pattern deep dive |\n| references\u002Fprovisioning-cli-commands.md | Copy-pasteable CLI |\n\n## Mindset\n\n**One-line takeaway:** A bucket policy is a JSON access-control\ndocument attached directly to an S3 bucket. It is evaluated\nalongside the IAM policy of the caller — effective permission is\nthe intersection. Bucket policies are the primary mechanism for\ncross-account access, network-source restrictions, and enforcing\nTLS; ACLs are legacy and should not be used.\n\nThe three misconceptions in full (bucket policy vs IAM policy override, `Principal: *` + Condition scoping, ACLs vs policies): [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Configuration dependency graph (novel heuristic)\n\nBucket-policy configurations are NOT independent. Many silently\nno-op without their prerequisite; others conflict with each other.\nUse this graph to sequence provisioning and debug \"why is my policy\nnot taking effect?\" later.\n\n| Configuration | Hard dependencies (API error without) | Silent failure \u002F immutability | Enables downstream |\n|---|---|---|---|\n| Bucket policy | bucket exists; policy is valid JSON \u003C 20 KB | **policy > 20 KB is rejected by put-bucket-policy** with `MalformedPolicy` | access control |\n| `Principal: *` + Condition | valid condition key | **`Principal: *` with `aws:SourceVpce` still allows any identity in the VPC** — not identity-scoped | network-source restriction |\n| `aws:SecureTransport: false` Deny | n\u002Fa | **Deny without `Bool` operator using `StringNotEquals` silently matches wrong values** — use `Bool` | HTTPS enforcement |\n| `aws:SourceVpce` condition | VPC endpoint exists | **wrong endpoint ID silently blocks ALL traffic** or allows ALL if negated incorrectly | VPC-only access |\n| `aws:SourceVpc` condition | request comes through a VPC endpoint with private DNS | **requests NOT through a VPC endpoint do not have `aws:SourceVpc` set** — condition silently does not match | VPC-scoped access |\n| `aws:SourceIp` condition | valid CIDR | **`aws:SourceIp` is NOT populated for requests through a NAT gateway in some configs** — use `aws:SourceVpc` or `aws:SourceVpce` for VPC traffic | IP-based restriction |\n| CloudFront OAC | OAC config exists in CloudFront | **legacy OAI (Origin Access Identity) and OAC are different** — OAC policy with an OAI principal silently fails | CDN origin access |\n| Block Public Access | n\u002Fa | **BPA `RestrictPublicBuckets` silently blocks public policies even if the policy allows them** — BPA is a guardrail above the policy | public-access guardrail |\n| Access Points delegation | access points exist | **bucket policy is still evaluated cumulatively with AP policy** — a Deny in the bucket policy cannot be overridden by the AP policy | per-team scoping |\n| MRAP policy | MRAP exists | **MRAP policy and bucket policy are separate documents** — MRAP policy does not replace bucket policy | multi-region access |\n\n**The `aws:SecureTransport` and `aws:SourceVpce` rows are the ones\na baseline model misses.** Using `StringNotEquals` instead of `Bool`\nfor SecureTransport, and using `aws:SourceVpc` for non-endpoint\ntraffic, both produce policies that look correct but silently match\nthe wrong condition. The procedure below forces the correct\ncondition operator for each pattern.\n\n**Cross-dependency gotchas:**\n- A bucket policy with `Effect: Deny` CANNOT be overridden by any\n  IAM Allow. Deny wins in all cases. This is why overly broad Deny\n  statements are dangerous.\n- `Principal: *` makes the policy public — it allows any AWS\n  identity (including from other accounts) subject to conditions.\n  Always pair with conditions for non-public buckets.\n- Block Public Access (BPA) at the bucket or account level is a\n  guardrail ABOVE the policy. If BPA `RestrictPublicBuckets` is on,\n  a policy with `Principal: *` is silently blocked even if the\n  policy explicitly allows it.\n\n## Expert heuristic: the aws:SecureTransport condition operator\n\nThe aws:SecureTransport operator deep dive (correct `Bool` vs wrong `StringNotEquals`, why, complete HTTPS-only Deny, key implication): [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Expert heuristic: aws:SourceVpce vs aws:SourceVpc vs aws:SourceIp\n\nThe aws:SourceVpce vs aws:SourceVpc vs aws:SourceIp comparison table, the endpoint-only-population gotcha, the correct VPC-endpoint-only pattern, and the SourceIp-through-endpoint caveat: [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Expert heuristic: policy vs ACL — policy always preferred\n\nThe policy-vs-ACL comparison table and the `BucketOwnerEnforced` production default: [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## Prerequisites (verify before provisioning)\n\nBefore emitting provisioning commands, verify these prerequisites.\nIf any are missing, the verdict is **PREREQUISITES_MISSING** with a\nspecific gap citation.\n\n| Prerequisite | How to verify |\n|---|---|\n| Bucket exists | `aws s3api head-bucket --bucket \u003Cname>` |\n| Account ID | `aws sts get-caller-identity --query Account` |\n| Policy JSON valid | `python3 -m json.tool policy.json` |\n| Policy size \u003C 20 KB | `wc -c policy.json` |\n| VPC endpoint ID (if using aws:SourceVpce) | `aws ec2 describe-vpc-endpoints --vpc-endpoint-ids \u003Cid>` |\n| CloudFront OAC config (if using OAC) | `aws cloudfront get-origin-access-control --id \u003Cid>` |\n| Block Public Access posture | `aws s3api get-public-access-block --bucket \u003Cname>` |\n| Object ownership (BucketOwnerEnforced) | `aws s3api get-bucket-ownership-controls --bucket \u003Cname>` |\n\nIf any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`\nand cite the specific gap.\n\n## Step 1 — Policy structure (Principal, Action, Resource, Condition)\n\nEvery bucket policy is a JSON document with a `Version` and a\n`Statement` array. Each statement has four core elements.\n\nCanonical four-element policy JSON example: [references\u002Fpolicy-patterns.md](references\u002Fpolicy-patterns.md).\n\n**Element rules:**\n- **Version:** always `\"2012-10-17\"` (NOT `2008-10-17` — the older\n  version lacks support for policy variables).\n- **Effect:** `Allow` or `Deny`. Deny overrides any Allow.\n- **Principal:** the identity being granted\u002Fdenied access. Use a\n  specific ARN for identity-scoped access. Use `\"*\"` for everyone\n  (public) — always pair with a Condition.\n- **Action:** S3 actions (`s3:GetObject`, `s3:PutObject`,\n  `s3:ListBucket`, etc.). Use fully-qualified names.\n- **Resource:** the bucket ARN (`arn:aws:s3:::my-bucket`) for\n  bucket-level actions and object ARN (`arn:aws:s3:::my-bucket\u002F*`)\n  for object-level actions. List both for policies that cover both.\n- **Condition:** optional. See the expert heuristics for\n  `aws:SecureTransport`, `aws:SourceVpce`, `aws:SourceVpc`.\n\n**Common mistake:** listing only the bucket ARN (`arn:aws:s3:::bucket`)\nbut omitting the object ARN (`arn:aws:s3:::bucket\u002F*`). Bucket-level\nactions (`s3:ListBucket`) use the bucket ARN; object-level actions\n(`s3:GetObject`, `s3:PutObject`) use the object ARN. A policy with\nonly the bucket ARN will deny all object operations.\n\n## Step 2 — HTTPS-only (aws:SecureTransport)\n\nSee the \"Expert heuristic: the aws:SecureTransport condition\noperator\" section. The canonical HTTPS-only Deny — **always use\n`Bool`, never `StringNotEquals`:**\n\n```json\n{\n  \"Sid\": \"DenyInsecureTransport\",\n  \"Effect\": \"Deny\",\n  \"Principal\": \"*\",\n  \"Action\": \"s3:*\",\n  \"Resource\": [\"arn:aws:s3:::my-bucket\", \"arn:aws:s3:::my-bucket\u002F*\"],\n  \"Condition\": { \"Bool\": { \"aws:SecureTransport\": \"false\" } }\n}\n```\n\n## Step 3 — Cross-account access\n\nTo grant another account access, use the foreign account's role ARN\nas Principal. Both sides must allow (bucket policy AND the foreign\nrole's IAM policy).\n\n```json\n{\n  \"Sid\": \"AllowCrossAccountRead\",\n  \"Effect\": \"Allow\",\n  \"Principal\": { \"AWS\": \"arn:aws:iam::998877665544:role\u002FPartnerRole\" },\n  \"Action\": [\"s3:GetObject\", \"s3:ListBucket\"],\n  \"Resource\": [\"arn:aws:s3:::my-bucket\", \"arn:aws:s3:::my-bucket\u002Fshared\u002F*\"],\n  \"Condition\": { \"StringEquals\": { \"aws:ExternalId\": \"unique-external-id\" } }\n}\n```\n\n**Key rules:** use `aws:ExternalId` for third-party access (prevents\nconfused-deputy). Scope `Resource` to specific prefixes when\npossible. **Common mistake:** granting `:root` instead of a specific\nrole ARN — `:root` delegates to the ENTIRE foreign account.\n\n## Step 4 — VPC-endpoint-only (aws:SourceVpce)\n\nSee the \"Expert heuristic: aws:SourceVpce vs aws:SourceVpc vs\naws:SourceIp\" section. The VPC-endpoint-only Deny:\n\n```json\n{\n  \"Sid\": \"DenyNotFromVpcEndpoint\",\n  \"Effect\": \"Deny\",\n  \"Principal\": \"*\",\n  \"Action\": \"s3:*\",\n  \"Resource\": [\"arn:aws:s3:::my-bucket\", \"arn:aws:s3:::my-bucket\u002F*\"],\n  \"Condition\": { \"StringNotEquals\": { \"aws:SourceVpce\": \"vpce-0abc123def456\" } }\n}\n```\n\n**Key rule:** this Deny blocks ALL traffic not from the specified\nVPC endpoint. Verify the endpoint ID before applying — a wrong ID\nblocks all access.\n\n## Step 5 — CloudFront Origin Access Control (OAC)\n\nCloudFront OAC is the successor to the legacy Origin Access\nIdentity (OAI). OAC supports SSE-KMS and all CloudFront features.\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllowCloudFrontServicePrincipalReadOnly\",\n      \"Effect\": \"Allow\",\n      \"Principal\": { \"Service\": \"cloudfront.amazonaws.com\" },\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::my-bucket\u002F*\",\n      \"Condition\": {\n        \"StringEquals\": {\n          \"AWS:SourceArn\": \"arn:aws:cloudfront::123456789012:distribution\u002FE123ABCDEF456\"\n        }\n      }\n    }\n  ]\n}\n```\n\n**Key rules:**\n- Use `Principal: { \"Service\": \"cloudfront.amazonaws.com\" }` (not\n  the OAI canonical user ID).\n- The `AWS:SourceArn` condition restricts access to a specific\n  CloudFront distribution. Without it, ANY CloudFront distribution\n  in the account can access the bucket.\n- OAC supports SSE-KMS (OAI did not).\n- The OAC configuration must exist in CloudFront first\n  (`create-origin-access-control`).\n\n**Common mistake:** using the legacy OAI principal (canonical user\nID `c4c1ede66af53448b93e28bd014fbedd65`) instead of the OAC\nservice principal. OAI is legacy; always use OAC.\n\n## Step 6 — AWS service access\n\nTo grant an AWS service (Lambda, KMS, Config, logging) access to a\nbucket, use the service principal with a condition.\n\n```json\n{\n  \"Sid\": \"AllowLambdaLogging\",\n  \"Effect\": \"Allow\",\n  \"Principal\": { \"Service\": \"logging.amazonaws.com\" },\n  \"Action\": \"s3:PutObject\",\n  \"Resource\": \"arn:aws:s3:::my-bucket\u002Flogs\u002F*\",\n  \"Condition\": {\n    \"StringEquals\": { \"s3:x-amz-acl\": \"bucket-owner-full-control\" }\n  }\n}\n```\n\n**Key rule:** `s3:x-amz-acl: bucket-owner-full-control` ensures the\nbucket owner (not the writing service) owns the objects — critical\nfor cross-account logging. Without it, the service account owns\nthe objects and the bucket account cannot read them.\n\n## Step 7 — Policy vs ACL (policy preferred)\n\nSee the \"Expert heuristic: policy vs ACL\" section. Production\ndefault: disable ACLs with `BucketOwnerEnforced` ownership:\n\nDisable-ACLs CLI (`put-bucket-ownership-controls` with `BucketOwnerEnforced`): [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md).\n\nThis disables ACLs entirely — all access control flows through\nbucket policies and IAM.\n\n## Step 8 — 20 KB policy size limit\n\nS3 bucket policies have a maximum size of 20 KB. Policies exceeding\nthis limit are rejected by `put-bucket-policy` with\n`MalformedPolicy`.\n\n**Mitigations for large policies:**\n\n| Strategy | When to use |\n|---|---|\n| Use wildcard prefixes | When many prefixes share the same access pattern |\n| Use S3 Access Points | When different teams need different policies on the same bucket |\n| Use IAM policies instead | When the policy grants access to specific roles (not cross-account) |\n| Reduce statement count | Merge similar statements with multi-action \u002F multi-resource arrays |\n\nPolicy-size verification commands (`wc -c`, 20 KB limit): [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md).\n\n**Common mistake:** adding a statement per team\u002Fdepartment until\nthe policy exceeds 20 KB. Use Access Points (Step 9) to delegate\nper-team policies instead of cramming everything into one bucket\npolicy.\n\n## Step 9 — Access Points policy delegation\n\nS3 Access Points allow attaching separate policies to named entry\npoints on a bucket. Each access point has its own policy, evaluated\nalongside (not instead of) the bucket policy. Use Access Points to\navoid exceeding the 20 KB bucket-policy limit with per-team rules.\n\n```bash\naws s3control put-access-point-policy \\\n  --account-id 123456789012 \\\n  --name team-a-ap \\\n  --policy file:\u002F\u002Fap-policy.json\n```\n\nThe access point policy uses the access point ARN (not the bucket\nARN) as the resource:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Principal\": { \"AWS\": \"arn:aws:iam::123456789012:role\u002FTeamARole\" },\n    \"Action\": [\"s3:GetObject\", \"s3:PutObject\"],\n    \"Resource\": \"arn:aws:s3:us-east-1:123456789012:accesspoint\u002Fteam-a-ap\u002Fteam-a\u002F*\"\n  }]\n}\n```\n\n**Key rule:** the bucket policy is still evaluated. A Deny in the\nbucket policy cannot be overridden by the AP policy. See\n`s3-access-points-deployer` for the full access point procedure.\n\n## Step 10 — MRAP policy\n\nA Multi-Region Access Point (MRAP) has its own policy, separate\nfrom the underlying bucket policies.\n\n```bash\naws s3control put-multi-region-access-point-policy \\\n  --account-id 123456789012 \\\n  --details Name=my-mrap,Policy=file:\u002F\u002Fmrap-policy.json\n```\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Principal\": { \"AWS\": \"arn:aws:iam::123456789012:role\u002FGlobalApp\" },\n    \"Action\": [\"s3:GetObject\", \"s3:PutObject\"],\n    \"Resource\": \"arn:aws:s3::123456789012:accesspoint\u002Fmy-mrap\"\n  }]\n}\n```\n\n**Key rules:** MRAP ARN format differs — `arn:aws:s3::account:accesspoint\u002Fname`\n(no region). MRAP policy does NOT replace bucket policies. MRAP\nroutes to nearest region; pre-existing objects NOT backfilled.\n\n## Step 11 — Recent features\n\nRecent AWS features detail (CloudFront OAC, BucketOwnerEnforced, Access Points delegation, MRAP policies, SourceVpc\u002FSourceVpce, Batch Operations for ACL migration): [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n## NEVER do these things\n\n1. **NEVER use `StringNotEquals` for `aws:SecureTransport`.** Use\n   the `Bool` operator instead. `aws:SecureTransport` is a boolean\n   key; `Bool` evaluates it canonically. `StringNotEquals` is\n   fragile and can silently fail on edge-case clients. The\n   correct pattern is `\"Bool\": { \"aws:SecureTransport\": \"false\" }`\n   in a Deny statement.\n\n2. **NEVER use S3 ACLs for access control.** ACLs are legacy,\n   limited to 100 grants, cannot express conditions, and are\n   ignored when Block Public Access is enabled. Always use bucket\n   policies. Disable ACLs with `BucketOwnerEnforced` ownership.\n\n3. **NEVER use `aws:SourceIp` for VPC-endpoint traffic.** The\n   source IP becomes the endpoint's internal IP, not the client's.\n   For VPC-based restrictions, use `aws:SourceVpce` (specific\n   endpoint) or `aws:SourceVpc` (VPC-scoped). `aws:SourceIp` only\n   works for direct internet requests.\n\n4. **NEVER omit the object ARN (`arn:aws:s3:::bucket\u002F*`) from the\n   Resource list.** Bucket-level actions (`s3:ListBucket`) use the\n   bucket ARN; object-level actions (`s3:GetObject`,\n   `s3:PutObject`) use the object ARN. A policy with only the\n   bucket ARN silently denies all object operations.\n\n5. **NEVER use the legacy CloudFront OAI canonical user ID as the\n   Principal.** OAI is legacy and does not support SSE-KMS. Always\n   use OAC with `Principal: { \"Service\": \"cloudfront.amazonaws.com\" }`\n   and `AWS:SourceArn` condition.\n\n## Output format\n\n```text\nBUCKET_POLICY: \u003Cbucket-name> (\u003Cn> statements, \u003Csize> KB)\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nCHECKLIST:\n  [✓|✗] Bucket exists: \u003Cname>\n  [✓|✗] Policy version: 2012-10-17\n  [✓|✗] Policy size: \u003Cn> KB (\u003C 20 KB limit)\n  [✓|✗] HTTPS-only (aws:SecureTransport Deny with Bool): present | not needed\n  [✓|✗] Cross-account: \u003Caccount-id> (\u003Crole-arn>, external-id: \u003Cid>)\n  [✓|✗] VPC-endpoint-only (aws:SourceVpce): vpce-\u003Cid> | not needed\n  [✓|✗] CloudFront OAC: distribution \u003Carn> | not needed\n  [✓|✗] Service access: \u003Cservice> (s3:x-amz-acl: bucket-owner-full-control)\n  [✓|✗] ACLs disabled: BucketOwnerEnforced\n  [✓|✗] Block Public Access: all 4 settings True\n  [✓|✗] Access Points delegation: \u003Cn> APs | none\n  [✓|✗] MRAP policy: \u003Cmrap-name> | none\nVERIFICATION_COMMANDS:\n  aws s3api get-bucket-policy --bucket \u003Cname>\n  aws s3api get-public-access-block --bucket \u003Cname>\n  aws s3api get-bucket-ownership-controls --bucket \u003Cname>\n```\n\n### Worked example — HTTPS-only + cross-account + CloudFront OAC\n\n```text\nBUCKET_POLICY: prod-shared-data (3 statements, 1.8 KB)\nVERDICT: READY_TO_DEPLOY\nCHECKLIST:\n  [✓] Bucket exists: prod-shared-data\n  [✓] Policy version: 2012-10-17\n  [✓] Policy size: 1.8 KB (\u003C 20 KB limit)\n  [✓] HTTPS-only (aws:SecureTransport Deny with Bool): present\n  [✓] Cross-account: 998877665544 (arn:aws:iam::998877665544:role\u002FPartnerRole, external-id: partner-ext-123)\n  [✓] CloudFront OAC: distribution arn:aws:cloudfront::123456789012:distribution\u002FE123ABCDEF456\n  [✓] ACLs disabled: BucketOwnerEnforced\n  [✓] Block Public Access: all 4 settings True\nVERIFICATION_COMMANDS:\n  aws s3api get-bucket-policy --bucket prod-shared-data\n  aws s3api get-public-access-block --bucket prod-shared-data\n  aws s3api get-bucket-ownership-controls --bucket prod-shared-data\n  aws cloudfront get-origin-access-control --id E123ABCDEF456\n```\n\n## Error handling\n\nAll five failure scenarios (`MalformedPolicy`, applied-but-denied, SourceVpce not matching, CloudFront OAC 403, cross-account denied despite policy): [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\n\n## References (load on demand)\n\n- [Advanced patterns](references\u002Fadvanced-patterns.md) — the three Mindset misconceptions, the aws:SecureTransport \u002F SourceVpce-vs-SourceVpc-vs-SourceIp \u002F policy-vs-ACL expert heuristics, recent AWS features\n- [Error handling](references\u002Ferror-handling.md) — put-bucket-policy failure scenarios and their diagnosis\n- [Policy patterns](references\u002Fpolicy-patterns.md) — pattern comparison, per-pattern JSON, canonical policy-structure example\n- [Provisioning CLI commands](references\u002Fprovisioning-cli-commands.md) — full copy-pasteable CLI sequence, Terraform equivalent\n\n## Domain\n\nAWS CloudOps \u002F S3 Bucket Policy Provisioning & Storage Access\nControl Management.\n\n## AWS documentation\n\n- **Bucket policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Fbucket-policies.html\n- **Policy conditions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Famazon-s3-policy-keys.html\n- **aws:SecureTransport** — https:\u002F\u002Fdocs.aws.amazon.com\u002FIAM\u002Flatest\u002FUserGuide\u002Freference_policies_condition-keys.html#condition-keys-securetransport\n- **CloudFront OAC** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fprivate-content-restricting-access-to-s3.html\n- **Object Ownership** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Fabout-object-ownership.html\n- **Access Points policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Faccess-points-policies.html\n- **MRAP policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002FMrapPolicy.html\n- **Block Public Access** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Faccess-control-block-public-access.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":41},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"dependencies":37,"requires_llm":38,"verdict_shape":39,"lifecycle_status":40,"supports_pipeline":38},"aws, s3, bucket-policy, cloudfront-oac, vpc-endpoint, cloudops, deploy, storage","1","Jacky Chan — AWS Community Builder","aws-cloudops","Storage","0.1.0","aws, s3, bucket policy, aws:SecureTransport, cross-account, vpc endpoint, aws:SourceVpce, aws:SourceVpc, aws:SourceIp, cloudfront oac, origin access control, s3:x-amz-acl, access points delegation, mrap policy, policy size limit, cloudops, deploy","deploy","high","false","capability","Invoke when the user wants to attach or replace an S3 bucket policy: enforcing HTTPS-only access (aws:SecureTransport Deny), granting cross-account access with conditions, restricting to a VPC endpoint (aws:SourceVpce), configuring CloudFront Origin Access Control (OAC), granting AWS service access, delegating via S3 Access Points, or configuring a Multi-Region Access Point policy. Do NOT invoke for bucket-level hardening without a policy (use s3-secure-bucket-deployer), for access point creation (use s3-access-points-deployer), for S3 ACLs (legacy — policies are preferred), or for auditing existing policies (use s3-public-access-auditor).","aws-orchestrator","true","READY_TO_DEPLOY | PREREQUISITES_MISSING","active","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Live provisioning uses AWS CLI v2 with s3api (put-bucket-policy, get-bucket-policy, delete-bucket-policy), s3control (put-access-point-policy, put-multi-region-access-point-policy), cloudfront (get-origin-access-control). Works with Terraform aws_s3_bucket_policy and CloudFormation AWS::S3::BucketPolicy.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fs3-bucket-policy-deployer",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill s3-bucket-policy-deployer",{"tool":56,"command":57},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill s3-bucket-policy-deployer",{"tool":59,"command":60},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill s3-bucket-policy-deployer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002FSKILL.md",true,[64,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",5260,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Feval\u002Ftest-cases.yaml",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fbaselines\u002Fcloudfront-oac-policy.md",928,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fbaselines\u002Fcloudfront-oac-policy.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"evals\u002Fbaselines\u002Fcross-account-external-id.md",869,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fbaselines\u002Fcross-account-external-id.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002Fbaselines\u002Fhttps-only-secure-transport.md",853,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fbaselines\u002Fhttps-only-secure-transport.md",{"path":83,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":84,"sourceHtmlUrl":85},"evals\u002Fbaselines\u002Fpolicy-size-limit-exceeded.md",588,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fbaselines\u002Fpolicy-size-limit-exceeded.md",{"path":87,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":88,"sourceHtmlUrl":89},"evals\u002Fbaselines\u002Fvpc-endpoint-only-access.md",891,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fbaselines\u002Fvpc-endpoint-only-access.md",{"path":91,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":92,"sourceHtmlUrl":93},"evals\u002Feval_config.yaml",1788,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Feval_config.yaml",{"path":95,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":96,"sourceHtmlUrl":97},"evals\u002Fevals.json",9849,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fevals.json",{"path":99,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":100,"sourceHtmlUrl":101},"evals\u002Fprompts\u002Fcloudfront-oac-policy.md",529,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fprompts\u002Fcloudfront-oac-policy.md",{"path":103,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":104,"sourceHtmlUrl":105},"evals\u002Fprompts\u002Fcross-account-external-id.md",516,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fprompts\u002Fcross-account-external-id.md",{"path":107,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":108,"sourceHtmlUrl":109},"evals\u002Fprompts\u002Fhttps-only-secure-transport.md",456,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fprompts\u002Fhttps-only-secure-transport.md",{"path":111,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":112,"sourceHtmlUrl":113},"evals\u002Fprompts\u002Fpolicy-size-limit-exceeded.md",437,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fprompts\u002Fpolicy-size-limit-exceeded.md",{"path":115,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":116,"sourceHtmlUrl":117},"evals\u002Fprompts\u002Fvpc-endpoint-only-access.md",436,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fevals\u002Fprompts\u002Fvpc-endpoint-only-access.md",{"path":119,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":120,"sourceHtmlUrl":121},"examples\u002FREADME.md",5814,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fexamples\u002FREADME.md",{"path":123,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Fadvanced-patterns.md",6980,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Freferences\u002Fadvanced-patterns.md",{"path":127,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Ferror-handling.md",1154,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Freferences\u002Ferror-handling.md",{"path":131,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Fpolicy-patterns.md",8573,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Freferences\u002Fpolicy-patterns.md",{"path":135,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Fprovisioning-cli-commands.md",8273,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Freferences\u002Fprovisioning-cli-commands.md",{"path":139,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":140,"sourceHtmlUrl":141},"skill.usf.yaml",4427,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fs3-bucket-policy-deployer\u002Fskill.usf.yaml",[143,150,157,164,171,178],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","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 \u002F method \u002F 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 \u002F 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 \u002F EKS \u002F 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","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 \u002F 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","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\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","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\u002Fbypass 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]