2

I am trying to generate AWS API gateway access key through powershell. However, everytime I try to use any cmdlet it throws an error:

For example:

 Get-AWSCredential -ListProfileDetail

will result in an error like this:

Get-AWSCredential : The term 'Get-AWSCredential' 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 + Get-AWSCredential -ListProfileDetail + ~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-AWSCredential:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

When I display the list of commands through Get-Command the AWS cmdlets do not pop up. Any idea what could be the problem?

1
  • I assume you haven't installed the cmdlets. I posted the command in answers with a reference to Amazon docs. Nov 13, 2017 at 20:43

1 Answer 1

15

Long story short, run this: Install-Package -Name AWSPowerShell

You may need to run PS as an Administrator for the Install-Package command to work. Additionally, you may be prompted to install 'nuget', answer yes. If you receive the security warning about PSGallery, answer yes.

Here is Amazon's docs on PS cmdlets: http://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up.html

2
  • It was an access issue. Installed it. Nov 13, 2017 at 21:16
  • i switched to WSL linux subsystem terminal windows terminal
    – shareef
    Aug 4, 2021 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.