Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

208
Vistas
AWS S3 public bucket hosting static webpage behind a proxy

I’m trying to access some webpages available using S3, and it works fine using an url like the following: http://my-crazy-bucket.s3-website-us-east-1.amazonaws.com

Thing is.. I need to hide those page's url behind an javascript written proxy application, using express. I was able to do this before using elastic beanstalk instead of S3. But when I tried migrating those static pages from EB to S3, and accessed it using the proxy url for that given s3 bucket. This resulted in the following error:

404 Not Found
Code: NoSuchBucket
Message: The specified bucket does not exist
BucketName: my-proxy-url.com
RequestId: some stuff...
HostId:  some more stuff...

I was hoping to see my-crazy-bucket instead of my-proxy-url.com in the BucketName of this error.

I did configured the CORS as permissive in the bucket configuration like this:

<CORSConfiguration>
 <CORSRule>
   <AllowedOrigin>https://my-proxy-url.com</AllowedOrigin>
   <AllowedMethod>GET</AllowedMethod>
   <MaxAgeSeconds>3000</MaxAgeSeconds>
   <AllowedHeader>Authorization</AllowedHeader>
 </CORSRule>
</CORSConfiguration>

But still the problem persists.

Do you guys think I need any additional S3 configuration or the problem is in my proxy (even though it worked before pointing to the same static pages hosted in the old elastic beanstalk instances)?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Not a CORS issue.

You have to change (rewrite) the HTTP Host: header of the incoming request, inside the proxy, before sending the outbound request, so that S3 understands that the bucket in question is my-crazy-bucket.s3-website-us-east-1.amazonaws.com.

It's not enough just to send the request to S3. It needs to be addressed to the correct bucket, and S3 determines which bucket that is, by looking at the incoming Host: header for a bucket endpoint or a bucket name.

Without seeing your proxying code, I can't be more specific.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda