1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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.
répondu il y a un an
Contenus pertinents
- demandé il y a un an
- demandé il y a 7 mois
- Réponse acceptéedemandé il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
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!