Skip to content

Instantly share code, notes, and snippets.

@koheyamada
Created March 25, 2018 07:27
Show Gist options
  • Select an option

  • Save koheyamada/73e2a9fbe77eefac65cdcd5e81d4d969 to your computer and use it in GitHub Desktop.

Select an option

Save koheyamada/73e2a9fbe77eefac65cdcd5e81d4d969 to your computer and use it in GitHub Desktop.
aws-cli で CloudFront の設定を変更する。 ref: https://qiita.com/kooohei/items/c6dcf9dfee6abf693656
$ aws cloudfront get-distribution-config --id "xxxxxxxxxxxxx" | jq '.DistributionConfig' > dist.conf
$ aws cloudfront get-distribution-config --id "xxxxxxxxxxxxx" --profile proudit | jq '.ETag'
"EZLFL1SIXPXTL"
$ aws cloudfront get-distribution-config --id "xxxxxxxxxxxxx" | jq '.["DistributionConfig"]["ViewerCertificate"]["MinimumProtocolVersion"]'
"TLSv1"
$ aws cloudfront update-distribution --id "xxxxxxxxxxxxx" --distribution-config file://dist.conf --if-match EZLFL1SIXPXTL
$ cat dist.conf | jq '.["ViewerCertificate"]["MinimumProtocolVersion"]'
"TLSv1"
$ aws cloudfront get-distribution-config --id "xxxxxxxxxxxxx" | jq '.["DistributionConfig"]["ViewerCertificate"]["MinimumProtocolVersion"]'
"TLSv1.1_2016"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment