Make a file in s3 public using python and boto

后端 未结 4 1880
半阙折子戏
半阙折子戏 2021-02-18 21:20

I have thins link below, and when I try to acess it it appears an xml file saying \"Acess denied\".

And I need to go to aws managment console and make this part-00

4条回答
  •  感动是毒
    2021-02-18 21:30

    Boto3 setting ACL. Good question/answers here.

    bucket.Acl().put(ACL='public-read')
    obj.Acl().put(ACL='public-read')
    

    Use of obj.Acl().put... is very helpful when moving or manipulating items. Especially helpful if scripting/procedural.

    via https://boto3.readthedocs.io/en/latest/guide/migrations3.html#access-controls.

提交回复
热议问题