I am trying to set up my AWS on my local machine through windows PowerShell, it gives me the following error message;
PS C:\> Set-AWSCredentials -AccessKey {AAAAAAAAAAAAAAA} -SecretKey {AAAAAAAAAAAAA} -Stor
eAs {default}
Set-AWSCredentials : Cannot evaluate parameter 'AccessKey' because its argument is specified as a script block and
there is no input. A script block cannot be evaluated without input.
At line:1 char:31
+ Set-AWSCredentials -AccessKey {AAAAAAAAAAAAAAA} -SecretKey {AAAAAAAAAAAA ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Set-AWSCredentials], ParameterBindingException
+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Amazon.PowerShell.Common.SetCredentialsCmdlet
And my Powershell Version is following;
Major Minor Build Revision
----- ----- ----- --------
3 0 -1 -1
Anyone knows what the problem is?
Thanks
It looks like you need to drop the brackets from your code, the documentation from amazon that comes up first in google includes them for some reason but if you check out http://docs.aws.amazon.com/powershell/latest/reference/items/Set-AWSCredentials.html and the examples near the bottom you'll see that the function is really expecting them in a string just like any other powershell cmdlet.
Set-AWSCredentials -AccessKey AAAAAAAAAAAAAAA -SecretKey AAAAAAAAAAAAA -StoreAs default
Should do the trick for you (if there are spaces in anything make sure to wrap the string in quotes)
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