0

I've set up an S3 bucket.

From a Linux host, once I create a config and credentials file, I can do:

aws s3api get-object --bucket <mybucket> --key <myfile> /root/<myfile>

and myfile is downloaded from S3.

From a Windows host, I do this in Powershell:

PS C:\Users\Administrator> Set-AWSCredentials -AccessKey <myaccesskey> SecretKey <mysecretkey> -StoreAs default

PS C:\Users\Administrator> read-s3object -bucketname <mybucket> -key <myfile> -file <myfile>

and I get:

Downloading <myfile> 0% and the shell hangs, eventually timing out with:

read-s3object : A WebException with status ConnectFailure was thrown. At line:1 char:1 + read-s3object -bucketname <bucket> -key <file> ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Amazon.PowerShe...dS3ObjectCmdlet:ReadS3ObjectCmdlet) [Read-S3Object] , InvalidOperationException + FullyQualifiedErrorId : Amazon.Runtime.AmazonServiceException,Amazon.PowerShell.Cmdlets.S3.ReadS3ObjectCmdleth

Any ideas? I'm using exactly the same credentials for both....

1 Answer 1

0

And the answer is...... in order to connect to S3, you need to allow egress of 443 and 80 from your instances.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .