Tuesday, October 25, 2022

AWS CLI retries, CloudFront distribution retry


AWS CLI retries - AWS Command Line Interface

  • A default value of 2 for maximum retry attempts, making a total of 3 call attempts. This value can be overwritten through the max_attempts configuration parameter.

  • Retry attempts on nondescriptive, transient error codes. Specifically, these HTTP status codes: 500, 502, 503, 504.

  • Any retry attempt will include an exponential backoff by a base factor of 2 for a maximum backoff time of 20 seconds.


The retry environment variables are:

  • AWS_RETRY_MODE

  • AWS_MAX_ATTEMPTS



You can use increase the number of retries directly in your command:

AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id=EVB1B2B3B4B56 --paths "/*"

No comments: