Skip to content

create-invalidation-for-distribution-tenant: CallerReference example uses single-quoted $(date +%s) #10469

Description

@cedricfarinazzo

Describe the issue

The create-invalidation-for-distribution-tenant example wraps the JSON payload in single quotes:

--invalidation-batch '{"Paths": {"Quantity": 1, "Items": ["/*"]}, "CallerReference": "invalidation-$(date +%s)"}'

Single quotes prevent $(date +%s) from expanding in any POSIX shell, so CallerReference is always the literal string invalidation-$(date +%s), confirmed by the example's own output, which echoes it back unexpanded.

Since CloudFront treats a repeated CallerReference with identical request as a duplicate and just returns the original invalidation instead of creating a new one, copying this example and running it more than once will silently do nothing on the 2nd+ run.

Links

https://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-invalidation-for-distribution-tenant.html

Metadata

Metadata

Labels

bugThis issue is a bug.documentationThis is a problem with documentation.investigatingThis issue is being investigated and/or work is in progress to resolve the issue.p2This is a standard priority issue

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions