Downloading from S3 bucket not working while using invoke powershell

Hello All;

I am trying to download objects of my S3 bucket using invoke Powershell (S3: Read-S3Object Cmdlet | AWS Tools for PowerShell). This command works in Windows Poweshell but fails in uipath. I am getting the following error message.

“Invoke Power Shell: No credentials specified or obtained from persisted/shell defaults.”

I am using the exactly same parameter set for both Windows PS and Uipath invoke activity.

The following one I used in WindowsPS and I got file downloaded
“Read-S3Object -BucketName bucketname -Key Test.csv -File D:\test\Test.csv”

In Uipath I even tried to pass Accesskey and SecretKey but fails to execute. I’ve created Environment variables for aws in windows (Environment variables to configure the AWS CLI - AWS Command Line Interface).

I cannot use PowershellActivity. Any and all help will be highly appreciated.

Hi @paul4thee,
Can you show me how are you using it in Invoke Powershell activity?

This what I have done. My question is more around any setup I need to make in windows for the uipath to use the AWS credentials to connect.

I also tried


with IsScript checked

I’m not sure if this will help you but I think it’s worth to try. For the test purposes please put whole script with all files and path written stiffly inside and save it as txt or ps1 file. Then using Read Text File activity grab this file and push it’s output to Invoke Power Shell activity. Then make sure that you have IsScript property enabled and your argument type set as System.Management.Automation.PSObject. Like on below screen:

Please check if this will work for you.