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

185
Visualizações
AWS CloudFront: How to map a Behavior Pattern to the Base of a Bucket

I'm using content to access multiple S3 buckets. The S3 Buckets are already being used for a number of different websites, which limits my ability to move the content around.

Let's say I have MY_BUCKET1, MYBUCKET2, MYBUCKET3, and all three have files in the base of the bucket.

I want to be able to set it so these files can be referenced at:

CF_CRAZY_URL.cloudfront.net/BUCKET1/file1.mp4
CF_CRAZY_URL.cloudfront.net/BUCKET2/file2.mp4
CF_CRAZY_URL.cloudfront.net/BUCKET3/file3.mp4

But when I choose the bucket as the origin in CloudFront, it looks like the way the behaviors work for folder mapping it looks for the files for the first behavior rule at:

CF_CRAZY_URL.cloudfront.net/file1.mp4

Which I'm pretty sure then makes it so it can't find: file2.mp4, since its not in that first bucket where its looking first.

Is there a way to do this?

Basically, I want: CF_CRAZY_URL.cloudfront.net/BUCKET1 to map to https://s3.amazonaws.com/BUCKET1/

Rather than: CF_CRAZY_URL.cloudfront.net/ mapping to https://s3.amazonaws.com/BUCKET1/

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

0

CloudFront uses the first matching path pattern to determine which origin server the request will be sent to.

It then sends the path exactly as it was received from the browser, unless an origin path is set on the origin, in which case the origin path is prepended before sending the request to the bucket.

Neither of these standard behaviors will do what you want -- with CloudFront, you can't remove anything from the path requested by the browser before sending it to the origin.

The only way to modify the path (to remove /BUCKETx from the beginning) before the bucket receives the request will be with a Lambda@Edge Origin Request trigger. Lambda@Edge, however, is still in preview, so it's not yet generally available.

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