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

質問済み 5年前1010ビュー
4回答
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

回答済み 5年前
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.

回答済み 5年前
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
回答済み 5年前
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!

回答済み 5年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ