diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 40f1ed8254d..11b8bf09623 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -731,7 +731,12 @@ func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { if d.HasChange("tags") { o, n := d.GetChange("tags") - if err := keyvaluetags.S3BucketUpdateTags(s3conn, d.Id(), o, n); err != nil { + // Retry due to S3 eventual consistency + _, err := retryOnAwsCode(s3.ErrCodeNoSuchBucket, func() (interface{}, error) { + terr := keyvaluetags.S3BucketUpdateTags(s3conn, d.Id(), o, n) + return nil, terr + }) + if err != nil { return fmt.Errorf("error updating S3 Bucket (%s) tags: %s", d.Id(), err) } }