Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delay in deleting a single object in aws s3

when I try to delete a single object using S3 .NET API it sometimes takes 30 minute or more to delete the object after the request sent successfully ... and sometime it works fine without any delay.

The code I am using:

AwsS3Handler amazonHandler = new AwsS3Handler(System.Web.HttpContext.Current);
amazonHandler.DeleteObject("object key", "BucketName", amazonID, amazonSecurityKey);

Any help regarding to this problem?

like image 990
Mohammad Fahmawi Avatar asked Sep 03 '25 05:09

Mohammad Fahmawi


1 Answers

Amazon S3 uses "eventual consistency" model for DELETE operations -- meaning, your request will go through, but the actual operation may be delayed an undetermined amount of time. It has to do with the distributed nature of S3 storage. Your command needs to be propagated throughout multiple disks and, thus, may take more time to complete.

See more here:

http://aws.amazon.com/s3/faqs/#What_data_consistency_model_does_Amazon_S3_employ

That being said, 30 minutes is a lot of time and perhaps you should contact the AWS support forum and see if they have any idea what is going on.

like image 92
Ovidiu Bute Avatar answered Sep 04 '25 18:09

Ovidiu Bute