sincecutoff.com
← all changes

aws cloudfront sign-cookies generates signed cookies

Introduced 2026-10-27 · score 0.94

HOW TO USE IT

When a workflow needs cookies for protected CloudFront content, run `aws cloudfront sign-cookies` with the resource URL and signing inputs to generate them.

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

WHY THIS HELPS

Generate CloudFront signed cookies for a repository workflow that needs to share protected content.

REQUIREMENTS AND LIMITATIONS

  • 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.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card