JhennSys
JhennSys

Reputation: 23

Error "Unable to find type [Amazon.AWSClientFactory]" in Powershell trying to log into AWS S3

I need to upload files from a PC to an S3 bucket using a Powershell script. I get error: "Unable to find type [Amazon.AWSClientFactory]" trying to attach to AWS S3. I installed the AWS Powershell stuff. I am in the blue AWS Powershell window.

$client=[Amazon.AWSClientFactory]::CreateAmazonS3Client($accessKeyID,$secretAccessKey,$config)

Upvotes: 0

Views: 631

Answers (1)

JhennSys
JhennSys

Reputation: 23

Found an answer from a previous post here. Replaced line: $client=[Amazon.AWSClientFactory]::CreateAmazonS3Client($accessKeyID,$secretAccessKey,$config)

With: Initialize-AWSDefaults -Region $RegionEndpoint -AccessKey $accessKeyID -SecretKey $secretAccessKey

Upvotes: 0

Related Questions