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

feita há 2 anos957 visualizações
2 Respostas
1
Resposta aceita

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
ESPECIALISTA
kentrad
respondido há 2 anos
profile pictureAWS
ESPECIALISTA
Toni_S
avaliado há 2 anos
0

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

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas