Skip to content

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

Merged
ashovlin merged 1 commit into
aws:developfrom
cedricfarinazzo:fix-10469-cloudfront-tenant-invalidation-example
Jul 21, 2026
Merged

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

Conversation

@cedricfarinazzo

Copy link
Copy Markdown
Contributor

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
@ashovlin ashovlin self-assigned this Jul 20, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.60%. Comparing base (70d3b38) to head (6043b50).
⚠️ Report is 111 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10470      +/-   ##
===========================================
+ Coverage    93.42%   93.60%   +0.18%     
===========================================
  Files          211      211              
  Lines        17312    17355      +43     
===========================================
+ Hits         16174    16246      +72     
+ Misses        1138     1109      -29     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ashovlin
ashovlin merged commit e8556cd into aws:develop Jul 21, 2026
41 checks passed
aws-sdk-python-automation added a commit that referenced this pull request Jul 21, 2026
* release-1.45.53:
  Bumping version to 1.45.53
  Update changelog based on model updates
  Fix quoting in create-invalidation-for-distribution-tenant example (#10470)
  Fix shorthand syntax error location rendering (#10468)
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)

3 participants