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

gefragt vor 2 Jahren955 Aufrufe
2 Antworten
1
Akzeptierte Antwort

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
EXPERTE
kentrad
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
Toni_S
überprüft vor 2 Jahren
0

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

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen