Object storage keys not deleted, ACL can't be set when using boto3

Hi,

I'm trying to port from S3 to linode's object store, but I'm having a lot of difficulties with using the same code to simple functionalities like delete, copy, acl perms work…

a) delete not working

In boto3, I'm using the following code to delete an existing object.

S3_RESOURCE = boto3.resource('s3', endpoint_url='https://<bkt name>.<region>.linodeobjects.com')
res = S3_RESOURCE.Object(<bkt name>, 'foor/bar.png').delete()

The result I get is:

{'ResponseMetadata': {'RequestId': 'tx000000000000000d51a28-005e94b67b-fc5e8e-default',
  'HostId': '',
  'HTTPStatusCode': 204,
  'HTTPHeaders': {'date': 'Mon, 13 Apr 2020 18:59:07 GMT',
   'connection': 'keep-alive',
   'x-amz-request-id': 'tx000000000000000d51a28-005e94b67b-fc5e8e-default'},
  'RetryAttempts': 0}}

Do correct me if I'm wrong, but 204 means the object is updated successfully, right? then I should NOT see the object when I check it in my dev console online, but I still see the deleted object.

This code is taken from my old project which runs on S3 (I decided to try linode's object store for my new project) which runs on the same boto3 library. Why does it not work here?

b) How to set ACL permissions using boto3? linode object storage is advertised as boto3 compatible yet none of the ACL parameters work.

I'm copying a file to the bucket and setting the ACL like this:

S3_RESOURCE = boto3.resource('s3', endpoint_url='https://<bkt name>.<region>.linodeobjects.com')
res = S3_RESOURCE.Object(<bkt name>, 'foo/bar.png').put(Body=<file object>, ACL='aclpublic')

I've tried ACL = aclpublic, public-read but none of these work! what is the right value??

2 Replies

Can I get any replies from a staff?
There's pretty much zero documentation about boto3 caveats when using linode and we need to fix this soon or just move back to Amazon S3.

Update on this:
I've debugged this with Linode staff.
The problem was with my code with not handling the key paths properly.
Linode's object storage works as expected and exactly as AWS S3.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct