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

posta 5 anni fa1042 visualizzazioni
4 Risposte
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

con risposta 5 anni fa
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.

con risposta 5 anni fa
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
con risposta 5 anni fa
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!

con risposta 5 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande