SaroVin
SaroVin

Reputation: 1773

Delete a 0 byte object from S3

How can I delete files of 0bytes from amazon s3 bucket? If I try to download this file, AWS give me this error:

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>css/Icon </Key>
</Error>

But I cannot delete the bucket because there is this file...

Upvotes: 1

Views: 1453

Answers (1)

SaroVin
SaroVin

Reputation: 1773

The file name contain a line feed at the end. You can remove file with aws-cli:

aws s3 rm s3://BUCKET/css/Icon\r

Upvotes: 1

Related Questions