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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠