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

125
Vistas
Loading New Webpage Using AWS S3 Javascript SDK

I'm new to webdev so forgive me if this is an obvious one, but I can't wrap my head around a solution.

I'm currently hosting a static website on AWS S3. The login page is available for public access, but all other pages are only available to a specific IAM role that an authorized user will assume. Once a user enters their login credentials they will receive temporary AWS credentials that grant them access to restricted pages.

My question is: how do I programmatically load a restricted webpage? Normally I would do something like:

$('body').load(/path/to/index.html);

But the /path/to/index.html is only accessible to users with the IAM role. So do I need to use the S3 sdk to access that file? In my head I would need to do something like:

$('body').load(s3.getObject(/path/to/index.html));

But that wouldn't actually work.

Thanks for the help!

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

0

Do not put the page (HTML) itself as secret. Instead, put your essential data into a json file, and do a XHR to it.

Using a frontend framework with router, you can check if the user is authenticated and render a 403 if not.

The method depends on your framework, and I'm not going to describe it. You can use AWS SDK to fetch from S3 with authentication.

about 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