1

I am trying to automate pulling files from Amazon S3 storage to a local disk using a Cloudberry Explorer PowerShell script. Using the Desktop app, I am able to manually connect and bring files over to the local folder just fine. When using PowerShell I am receiving an error stating The Remote name could not be resolved 'http'. Below is my code, which I believe is correct. I've tried with and without the proxy info, and I get the same error. I also had my Network Admin bypass proxy authentication for the site as well. I'm not sure what else could be causing this error.

Add-PSSnapin CloudBerryLab.Explorer.PSSnapIn

#Set Proxy info
Set-CloudOption -ProxyAddress [proxy info here] -ProxyPort 8080

#Set connection to Amazon S3 account with access key and secret key
$s3 = Get-CloudS3Connection -Key ***** -Secret ***** -SignatureVersion 2 -UseSSL

#Set source and Destination folders
$source = $s3 | Select-CloudFolder -Path "my folder/subfolder"
$local = Get-CloudFileSystemConnection
$target = $local | Select-CloudFolder "C:\localdrive"

#Run sync folders source to target:
$source | Copy-CloudSyncFolders $target -DeleteOnTarget -MissingOnly
Cory Knutson
  • 1,866
  • 12
  • 20
Brian J
  • 11
  • 1

2 Answers2

1

In my opinion, it is better to use native S3 API for automating relatively simple tasks. I found Cloudberry's API being less reliable for such cases. Take a look here for more info: http://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html

Strepsils
  • 4,817
  • 9
  • 14
-1

it is enough to use just -UseSSL.

-SignatureVersion 2 is used only for S3-compatible providers.

This should work:

$s3 = Get-CloudS3Connection -UseSSL -Key ***** -Secret *****

Also just to make sure you can add "CloudBerry Explorer.exe" to the list of network exclusions to avoid possible network errors.

And last thing to note - currently Powershell is supported as is.

Vit
  • 1
  • Thanks. It is S3-compatible which is why i have the SignatureVersion2. I'll try the network exclusion you suggest and see if that works. – Brian J Aug 01 '17 at 20:47