S3 Un-versioned Bucket showing deleted objects when queried via ListObjects

0

So I have something strange happening and I am not sure why.

I have a simple bucket that is un-versioned. This bucket is owned by the root account in our test environment. I have an IAM user with rights to create/delete objects in the bucket.

This user runs processes which create new objects and then deletes older objects which are no longer needed.

If I log into the AWS console as the test root account interactively and look at the bucket all of the objects look as I expect - deleted objects are no longer listed or shown. New created objects are shown.

When I query the bucket via an Application (using ListObjectsV2Async in this case) using the IAM user's credentials, the response is returning items that have been deleted and do not show up in the console.

This bucket is not versioned. Is there something in the bucket setup I have missed or is there another reason why this may be occurring?

Thanks in advance for any assistance!
Dave

asked 5 years ago960 views
4 Answers
0

Hi,
How long after the delete, did you perform the query? The S3 Delete operation has eventual consistency in S3 (the S3 standard bucket data is normally stored across 3 AZs in a region).

A process deletes an existing object and immediately lists keys within its bucket. Until the deletion is fully propagated, Amazon S3 might list the deleted object. 

Link: https://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html
Of course, if it is still showing up in the query after a reasonable amount of time, then it's a mystery to me.
-randy

answered 5 years ago
0

In this case object that have been deleted for over a week are still showing up via API queries but not showing up in the console.

I am stuck as to why.

answered 5 years ago
0

Could the bucket ever have had versioning enabled? If so, you will still get delete markers even if it is currently suspended: https://docs.aws.amazon.com/AmazonS3/latest/dev/DeletingObjectsfromVersioningSuspendedBuckets.html

akda5id
answered 5 years ago
0

I don't think it ever had it enabled but to be sure I just manually emptied it and that seems to have solved the issue. Thanks again for your help!

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions