S3 read and write permission

0

In order to grant read and write permission to the S3 bucket, is the s3:ListBucket action necessary? Or would only the object-level action suffice? The following documentation is a bit unclear. https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_s3_rw-bucket.html

demandé il y a 3 mois190 vues
2 réponses
2
Réponse acceptée

Hello.

"s3:ListBucket" is required to retrieve a list of objects from an S3 bucket.
"s3:ListBucket" is not necessary when only writing.
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html
a

profile picture
EXPERT
répondu il y a 3 mois
profile picture
EXPERT
vérifié il y a 3 mois
profile pictureAWS
EXPERT
vérifié il y a 3 mois
  • If you know the object name in the bucket, is it still required to list the bucket objects in order to read and write?

  • If you know the object name in the bucket, you can download it even without "s3:ListBucket".

2

In Amazon S3, a bucket is a container of objects. Therefore, you can specify some settings at bucket level but, when reading and writing data, you are actually reading and writing objects. Therefore, in order to read and write objects you need to have the right permissions to read or write these objects: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html

Regarding s3:ListBucket, it is for listing the objects within a bucket. If you just want to access or write a specific object and you know the name of the object, you do not need to have those permissions. However, if you need to know (list) the objects within the bucket to identify the one(s) you want to access, you need permissions for s3:ListBucket.

AWS
répondu il y a 3 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions