add AWS API call retries on AMIGetFilteredImage (#10610)

This commit is contained in:
Trond Isak 2021-02-11 11:58:56 +01:00 committed by GitHub
parent 774c5903f6
commit 2c08479825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ func (d *AmiFilterOptions) GetFilteredImage(params *ec2.DescribeImagesInput, ec2
}
log.Printf("Using AMI Filters %v", params)
imageResp, err := ec2conn.DescribeImages(params)
req, imageResp := ec2conn.DescribeImagesRequest(params)
req.RetryCount = 11
err := req.Send()
if err != nil {
err := fmt.Errorf("Error querying AMI: %s", err)
return nil, err