{
  "slug": "aws-cloudfront-sign-cookies-generates-signed-cookies-33bd7579dc1f",
  "title": "aws cloudfront sign-cookies generates signed cookies",
  "tools": [
    "aws-cli"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-27T18:12:56.000Z",
  "announced_at": "2026-10-27T18:12:56.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a workflow needs cookies for protected CloudFront content, run `aws cloudfront sign-cookies` with the resource URL and signing inputs to generate them.",
    "examples": [
      "aws cloudfront sign-cookies --resource <https://distribution.example/path/*> --key-pair-id <key-pair-id> --private-key file://<private-key.pem> --date-less-than <YYYY-MM-DDThh:mm:ssZ> --output json"
    ],
    "gotchas": [
      "Version: 2.39.0",
      "Non-interactive: Writes formatted cookie-name/value output to stdout; output format defaults to the configured CLI format. Use `--query` to select cookie values in scripts.",
      "--resource (required): Protected content URL; supports `*` and `?` wildcards.",
      "--key-pair-id (required): Active CloudFront public key or key pair ID used for signing.",
      "--private-key (required): Private key in PEM format; use `file://<path>`.",
      "--date-less-than (required): Cookie expiration date and time.",
      "--output: Selects output format; JSON supports script parsing.",
      "Prerequisite: Provide an unencrypted RSA or ECDSA P-256 private key in PEM format."
    ]
  },
  "why_it_matters": "Generate CloudFront signed cookies for a repository workflow that needs to share protected content.",
  "sources": [
    "https://github.com/aws/aws-cli/blob/2.39.0/CHANGELOG.rst",
    "https://github.com/aws/aws-cli/blob/2.39.0/awscli/customizations/cloudfront/sign.py"
  ],
  "rank": 0.94015,
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261027-20",
    "verdict_id": "daily-20261027-20:daily-20261027-20-28e489ac32cf85c9-0:gate",
    "evidence_hash": "13fe0063062c016aaedb3607fcc6275c08288b748642bb77ddd1dd942847a6fd"
  }
}
