Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

295
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!