Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

255
Visualizações
How do I make public for download files owned by the s3-log-service?

I've created a bucket to hold the log files created by the s3-log-service, and I've made the permissions so that the bucket can be both listed and the contents are publically accessible. I can list the contents of the bucket but web access to a log is denied with a 403 error.

{
"Version": "2008-10-17",
"Statement": [
    {
        "Sid": "AllowPublicRead",
        "Effect": "Allow",
        "Principal": {
            "AWS": "*"
        },
        "Action": "s3:GetObject",
        "Resource": "arn:aws:s3:::mybucket/*"
    },
    {
        "Sid": "AllowPublicRead",
        "Effect": "Allow",
        "Principal": {
            "AWS": "*"
        },
        "Action": "s3:ListBucket",
        "Resource": "arn:aws:s3:::mybucket"
    }
  ]
}

I gather such a policy doesn't work when the object (log file) is owned by someone else.

So, what other permissions do I need to apply to the bucket contents to make them publically accessible?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You're correct in saying that the bucket policy does not apply to objects not owned by the AWS account. You have 2 options:

  1. You'll need to copy the objects onto themselves, setting the ACL flag to public-read:
AWS_ACCESS_KEY_ID=XXX \
AWS_SECRET_ACCESS_KEY=XXX \
aws s3 cp \
    s3://BUCKET/OBJECT_PATH \
    s3://BUCKET/OBJECT_PATH \
    --acl public-read
  1. Set the ACL flag to bucket-owner-full-control. From there, the bucket policy take over objects' permissions.

The only way I found to do either option (without getting access denied errors) is to use the AWS account root user's credentials.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda