import AWS from "aws-sdk" ; export const getProfileCredentials = ( profileName ) => { try { const credentials = new AWS . SharedIniFileCredentials ( { profile : profileName , } ) ; AWS . config . credentials = credentials ; return credentials ; } catch ( error ) { console . error ( error ) ; } } ;