授予Authenticated Users对S3存储桶的写访问权限

时间:2017-11-16 10:29:13

标签: amazon-web-services amazon-s3 amazon-iam aws-cli

我想将所有AWS身份验证用户的读取权限授予存储分区。注意我不希望我的桶可以公开。老亚马逊控制台似乎给出了我不再看到的那个条款 -

旧S3存储桶ACL -

enter image description here

新桶Acl -

enter image description here

我如何实现旧行为?我可以使用存储桶策略来执行此操作 -

我再一次不想要

from tkinter import *
from tkinter import ttk



root = Tk()
root.geometry('500x400')
root.grid_columnconfigure(0, weight=1)#This configures the column and row to be weighted.
root.grid_rowconfigure(0, weight=1)


main = ttk.Frame(root, padding = (3,3,3,3))#This creates the padding around all the contents.
main.grid(column=0, row=0, sticky=(N,W,E,S))
main.grid_columnconfigure(1, weight=1)
main.grid_rowconfigure(4, weight=1)




pagestyle = ttk.Style()
pagestyle.configure("G.TFrame" , background='green')

nav = ttk.Frame(main, borderwidth=2)
nav.grid(column=0, row=0, rowspan = 4, sticky=(N,W,E,S))


pageframe = ttk.Frame(main,style="G.TFrame" )
pageframe.grid(column = 1, row = 0, rowspan =5, sticky=(N,W,E,S))
pageframe.columnconfigure(0, weight=1)


text = Label(pageframe , text="Home")
text.grid(column=0, row=0)

text = Label(pageframe , text="Weekly Overview")
text.grid(column=0, row=1)

2 个答案:

答案 0 :(得分:2)

在新的s3控制台中删除了该支持,必须通过ACL设置。

您可以使用put-bucket-acl api将任何经过身份验证的AWS用户设置为被授权者。

受助人是:

<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><replaceable>http://acs.amazonaws.com/groups/global/AuthenticatedUsers</replaceable></URI></Grantee>

有关详细信息,请参阅http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTacl.html

答案 1 :(得分:1)

我们可以在aws cli命令中给出整个ACL字符串,如ExploringApple所解释的那样 - 或者只是 -

aws s3api put-bucket-acl --bucket bucketname --grant-full-control uri=http://acs.amazonaws.com/groups/global/AuthenticatedUsers

文档 - http://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-acl.html

相关问题