0

Deletion of AWS S3 buckets is failing. I was using the Java SDK when it started failing. Now I have tried the same thing manually i.e. via the web console, but the same issue persists. Here is the screenshot of one of the buckets.

enter image description here

The error from the java code is below:

Exception in thread "main" com.amazonaws.services.s3.model.AmazonS3Exception: The specified bucket does not 
exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request `ID: 23349323451658FC; S3 Extended Request ID: `
ggx4OT58UvYJsaGCXJxJ6cx04tsfWpoW6B0JUCeE9wDxgK6uJqMFb6d4qbPhcNGuuwDZpdEklVs=), 
S3 Extended Request ID: 
ggx4OT58UvYJsaGCXJxJ6cx04tsfWpoW6B0JUCeE9wDxgK6uJqMFb6d4qbPhcNGuuwDZpdEklVs=

The aws-cli actually returns the buckets in contrast to the java sdk. See the output below; Y:\>aws s3 ls 2019-05-23 16:44:18 bucket-4a6aa2a3-d6c8-4ef8-b5ae-e02df4d6beca 2019-05-23 16:44:04 bucket-e519ae8f-0f59-4a37-87a0-c9d2d5749977

UPDATE Without any changes, running the same Java application with the same credentials, the buckets just deleted. Completely NO idea what happened.

SyCode
  • 1,077
  • 4
  • 22
  • 33
  • 1
    AWS Support might be a better resource than SO. – Sean Bright May 23 '19 at 15:44
  • OK, i will try contacting them right away. – SyCode May 23 '19 at 15:46
  • @SeanBright it seams support is not for `Support plan:Basic` like mine. Is there a way to contact them without paying. I tried via this page `https://console.aws.amazon.com/support/home?region=us-west-1#` – SyCode May 23 '19 at 15:50
  • Using equivalent credentials, what does the awscli tell you when you list buckets (using 'aws s3 ls')? Does the bucket exist? – jarmod May 23 '19 at 15:55
  • @jarmod the buckets are listed using the aws-cli – SyCode May 23 '19 at 15:57
  • Make sure that you have the correct permissions to delete buckets – developing2020 May 23 '19 at 16:16
  • @developing2020 i don't think the issue is with permissions. I have the correct permissions actually. I even log into the web-console using as root and delete still fails. – SyCode May 23 '19 at 19:11
  • With respect to code: Can you check that you have set the correct region in your client when deleting the bucket? The error in your screenshot could be because of a S3 bucket policy in the bucket. Can you check that? – krishna_mee2004 May 23 '19 at 19:17
  • Have you set a bucket policy on this S3 bucket that may be preventing deletion? Also, is the bucket actually empty? – jarmod May 23 '19 at 22:54
  • You have already deleted this bucket. It should not be possible for the error message `The specified bucket does not exist... NoSuchBucket` to mean anything else. The listing of buckets is eventually consistent -- they do not always disappear from the listing immediately after you delete them. – Michael - sqlbot May 24 '19 at 01:56

0 Answers0