1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CloudFrontのキャッシュ削除をCLIでやる手順

Posted at

CloudFrontのキャッシュ削除をCLIでやる手順をメモ

手順

# CloudFrontのディストリビューションIDを入手
aws cloudfront list-distributions --profile {profile} | jq '.DistributionList.Items[] | .Id + " " + .Aliases.Items[0]' -r
# 希望のディストリビューションIDとキャッシュ削除するパスを指定して作成
aws cloudfront create-invalidation --distribution-id {distribution id} --paths '{キャッシュ削除したいパス}' --profile {profile}
# キャッシュ削除結果を確認、前のコマンドンの結果のjson Invalidation.Id を {invalidation id} に指定する
aws cloudfront get-invalidation --id {invalidateion id} --distribution-id {distribution id} --profile {profile}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?