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

294
Vistas
AWS FileSystemCredentials is not a constructor

I'm trying to load a JSON config file to protect my AWS keys

a.FileSystemCredentials is not a constructor
at constructor.loadFromPath(aws - sdk.min.js: 46)

This error is preventing me from using AWS.config.loadFromPath('../../s3.config.json');

It works fine when i use the unprotected AWS.config.update([json]); where json is the actual jsonData

app.js:

AWS.config.loadFromPath('../../s3.config.json');
var hub = new AWS.S3({ params: {Bucket: 'mybucket'} });

s3.config.json

{ "accessKeyId": "keyid", "secretAccessKey": "secretkey", "region": "us-east-1" }

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

0

I have the same issue. You are probably loading the aws js sdk for browser.

As you can see: https://sdk.amazonaws.com/builder/js/, AWS.FileSystemCredentials is not included, that is why FileSystemCredentials is not a constructor (to be more specific it is undefined). It looks like you can only use AWS.config.loadFromPath on server side (with something like node.js).

over 4 years ago · Santiago Trujillo Denunciar

0

Loading credentials from a JSON document is not supported in browser scripts.You have to create an identity pool and give permission for the required access

const AWS = require('aws-sdk')
AWS.config.update({region: 'us-east-1'});

AWS.config.credentials = new AWS.CognitoIdentityCredentials({IdentityPoolId: 'ur pool id'});
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