Exception creating client using AWS SDK Exception creating client using AWS SDK powershell powershell

Exception creating client using AWS SDK


Duh... I realized that I need to use the AWS Powershell because it has all the settings built into it. Im not exactly sure how to properly refer to this version of powershell, but it is available after installing the AWS SDK.


Since the error specifically states that you're missing the RegionEndpoint or ServiceURL, you could also just include one of them. Since you're connecting to S3, all you need is to include the RegionEndpoint.

Add-Type -Path "C:\Program Files (x86)\AWS SDK for .NET\bin\Net35\AWSSDK.dll"$secretKeyID="ABCDEFGHIJKLMNOPQRS"$secretAccessKeyID="LONGKEYBLAHBLAHBLAHBLAHBLABLAH"$client = [Amazon.AWSClientFactory]::CreateAmazonS3Client($secretKeyID, $secretAccessKeyID, [Amazon.RegionEndpoint]::USEast1)

(Replace USEast1 with the value configured with your S3 Bucket)