I just downloaded the latest version of AWS Powershell and tried this: Before I don't remember any problem. Now I am getting this error message:
PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> Set-AWSCredentials -AccessKey xxxxxxxx -SecretKey xxxxxxx -StoreAs xxxx
Set-AWSCredentials : The term 'Set-AWSCredentials' 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.
At line:1 char:1
+ Set-AWSCredentials -AccessKey xxxxxxx -SecretKey xxxxx
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-AWSCredentials:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell>
Does anyone have any ideas what I might be doing wrong? Has some syntax changed again :-(
Thanks
To use AWS programmatically from PowerShell, you need to generate your access keys. To do this, sign into the AWS console, and from the Services tab, select IAM under Security, Identity, & Compliance. From the left-hand side, select Users, and find the username you want to generate access keys for.
To set AWS credentials, you must have the access key ID and your secret access key for the IAM user you want to configure. For information about access key IDs and secret access keys, see Managing Access Keys for IAM Users in the IAM User Guide.
You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive. The aws_access_key_id and the aws_secret_access_key are stored in the ~/. aws/credentials file by default. You can use any editor to edit them, such as vim, emacs, or nano, e.g.
Using the Set-AWSCredentials Cmdlet Any accounts that you register through PowerShell will also show up in Visual Studio (including the AWS PS Default account you may have set up with Initialize-AWSDefaults ).
The tools install to a folder structure compliant with the auto-import support in PowerShell version 3 or higher, so Import-Module
should not be needed.
It does however require that the PSModulePath
update the installer performs takes effect, and we've noticed that on some systems you need to reboot after install.
Looking at PSModulePath
you should see something like this (excuse wrapping):
PS C:\> ls env:PSModulePath | fl Name : PSModulePath Value : C:\Users\userid\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\AWS Tools\PowerShell\
If so, try restarting your machine and then open a shell prompt and see if Set-AWSCredentials
becomes available. If not, report back and we'll try and repro.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With