This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS from 'aws-sdk'; | |
import config from './config.js'; | |
import sigV4Client from './sigV4Client'; | |
export function getAwsCredentials(userToken) { | |
const authenticator = `cognito-idp.${config.cognito.REGION}.amazonaws.com/${config.cognito.USER_POOL_ID}`; | |
AWS.config.update({ region: config.cognito.REGION }); | |
AWS.config.credentials = new AWS.CognitoIdentityCredentials({ |