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": "" } ] }

posta 2 anni fa956 visualizzazioni
2 Risposte
1
Risposta accettata

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
ESPERTO
kentrad
con risposta 2 anni fa
profile pictureAWS
ESPERTO
Toni_S
verificato 2 anni fa
0

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

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande