Skip to content

Fix quoting in create-invalidation-for-distribution-tenant example#10470

Open
cedricfarinazzo wants to merge 1 commit into
aws:developfrom
cedricfarinazzo:fix-10469-cloudfront-tenant-invalidation-example
Open

Fix quoting in create-invalidation-for-distribution-tenant example#10470
cedricfarinazzo wants to merge 1 commit into
aws:developfrom
cedricfarinazzo:fix-10469-cloudfront-tenant-invalidation-example

Conversation

@cedricfarinazzo

Copy link
Copy Markdown

Fix quoting in create-invalidation-for-distribution-tenant example

The create-invalidation-for-distribution-tenant example wrapped the entire --invalidation-batch JSON in single quotes, which prevents $(date +%s) from expanding in any POSIX shell. CallerReference was always the literal string "invalidation-$(date +%s)", so running the example more than once caused CloudFront to return the original invalidation instead of creating a new one.

Close the single quotes around the timestamp so $(date +%s) expands, and update the example output to show a real expanded value.

Fixes #10469

Fix quoting in create-invalidation-for-distribution-tenant example

The create-invalidation-for-distribution-tenant example wrapped the
entire --invalidation-batch JSON in single quotes, which prevents
$(date +%s) from expanding in any POSIX shell. CallerReference was
always the literal string "invalidation-$(date +%s)", so running the
example more than once caused CloudFront to return the original
invalidation instead of creating a new one.

Close the single quotes around the timestamp so $(date +%s) expands,
and update the example output to show a real expanded value.

Fixes aws#10469
@cedricfarinazzo cedricfarinazzo requested a review from a team as a code owner July 3, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant