Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


dillznit
2019-10-23T05:04:30Z
Since we want to use our own script and not use the Amazon cloud upload functionality inside VC, we have created a Job to use a trigger to detect a file and use our own PowerShell Upload script (that uses AWS CLI commands) to upload to S3.

I run the script locally, and it works fine. But through Visualcron Powershell job (we are using parameters)

We will get this error:
Error: The term 'Write-S3Object' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. - C:\FOLDER\DEMO2_RETAIL\QUOTES/20181207-20'47'59_to_20181207-21'02'59_BROKER1002_Quotes_v1.csv.gz (File Size in kb: 0 kb)

We also commented out the Write-S3Object, and tried other AWS S3 CLI Commands, with the same result.

Sponsor
Forum information
Support
2019-10-23T08:59:39Z
Originally Posted by: dillznit 

Since we want to use our own script and not use the Amazon cloud upload functionality inside VC, we have created a Job to use a trigger to detect a file and use our own PowerShell Upload script (that uses AWS CLI commands) to upload to S3.

I run the script locally, and it works fine. But through Visualcron Powershell job (we are using parameters)

We will get this error:
Error: The term 'Write-S3Object' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. - C:\FOLDER\DEMO2_RETAIL\QUOTES/20181207-20'47'59_to_20181207-21'02'59_BROKER1002_Quotes_v1.csv.gz (File Size in kb: 0 kb)

We also commented out the Write-S3Object, and tried other AWS S3 CLI Commands, with the same result.



Can you send screenshots to support@visualcron.com of your task settings please? We will continue the troubleshooting there
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
dillznit
2019-10-23T18:51:46Z
Hi it seems like the -profile for the AWS Set Credentials runs as the logged in user, and VisualCron runs as local system. I think this was the issue. We are getting around by using an .ini with credentials on each write-s3object.

$profileLocation = "C:\bin\credentials.ini"

Write-S3Object -ProfileLocation $profileLocation -BucketName $bucket -Key $key -File $fileName -Metadata @{md5chksum=$fileHash} -Force
Support
2019-10-23T19:43:21Z
Originally Posted by: dillznit 

Hi it seems like the -profile for the AWS Set Credentials runs as the logged in user, and VisualCron runs as local system. I think this was the issue. We are getting around by using an .ini with credentials on each write-s3object.

$profileLocation = "C:\bin\credentials.ini"

Write-S3Object -ProfileLocation $profileLocation -BucketName $bucket -Key $key -File $fileName -Metadata @{md5chksum=$fileHash} -Force



What about selecting a Credential (that you normally are logged in as) that has "Load profile" selected in the Credential?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top