S3 API Response Error while Applying Bucket Policy

0

I have created one Bucket and enabled versioning and Static Website Hosting but to host a static website I will have to make all the objects public So i applied the below mentioned Policy but while saving changes I am getting error "An Unexpected Error occured" stating that Action does not apply to any resource(s) in the statement ? Kidnly Help !!!!!

{ "Id": "Policy1661754296310", "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1661754292357", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Effect": "Allow", "Resource": "arn:aws:s3:::akshay-demo-new-2022/", "Principal": "" } ] }

demandé il y a 2 ans958 vues
2 réponses
1
Réponse acceptée

Try this one:

{
  "Id": "Policy1661758235544",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1661758233197",
      "Action": [
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::akshay-demo-new-2022/*",
      "Principal": "*"
    }
  ]
}

Added "*" in ARN and Principal.

profile pictureAWS
EXPERT
kentrad
répondu il y a 2 ans
profile pictureAWS
EXPERT
Toni_S
vérifié il y a 2 ans
0

That Worked !! Thanks @kentrad for your valuable help.

répondu il y a 2 ans

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