1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
As the AWS developer guide says, the use of ACLs isn't recommended any more so it's worthwhile spending time learning how to use bucket policies as they give you much more, fine-grained control over who or what can access the bucket.
There are a list of example bucket policies at https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html, and several online tutorials which will explain how to use them.
As example, if you had a prefix of upload
in your folder, you could allow uploads to the folder with a bucket policy similar to
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowUpload",
"Effect": "Allow",
"Action": ["s3:PutObject"],
"Resource": ["arn:aws:s3:::<EXAMPLEBUCKET>"],
"Condition": {
"StringEquals": {
"s3:prefix": ["upload"],
}
}
}
]
}
you'll need to replace EXAMPLEBUCKET with your bucket name.
답변함 일 년 전
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
Thanks for the link! How did I miss it :) Thank you Simon for the example. I will look deeper into this issue! And of course, thank you for not passing by my question. Respect to you!