2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Make sure your IAM role/user has s3:ListBucket permission added for that bucket, where you are listing/uploading objects.
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "Stmt1546506260896",
"Action": "s3:ListBucket",
"Effect": "Allow",
"Resource": "arn:aws:s3:::AWSDOC-EXAMPLE-BUCKET"
}]
}
Hope this helps.
Comment here if you have additional questions, happy to help.
Abhishek
0
Hi,
You need the following policy to list a bucket
{
"Statement": [
{
"Sid": "some_id",
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::bucketname",
"arn:aws:s3:::bucketname/*"
]
}
]
}
The most restrictive policy would be (if you feel that "Action": ["s3:*"]
is too broad:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::bucketname"
]
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::bucketname/*"
]
}
]
}
By using any of the two, you do not need the policy AmazonS3FullAccess (managed by AWS) anymore
Best,
Didier
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 4 mois