Gunty
Gunty

Reputation: 2479

How do i access AWS SAM-CLI through bash on windows?

I am running Windows 10 and can only access AWS SAM through command prompt but not bash. When i try to use bash, i get a bash: sam: command not found error.

If it helps, I currently have installed AWS CLI v2 and have installed it via an MSI file.

Why am i not able to use SAM through bash?

Edit: Yes i am aware that it doesnt explicitly say that you can use bash on the AWS setup guide

Verify the installation. After completing the installation, verify it by opening a new command prompt or PowerShell prompt. You should be able to invoke sam from the command line.

However, I still want to be able to use it through bash. Is there a workaround?

Upvotes: 6

Views: 2952

Answers (2)

K Bala Suresh
K Bala Suresh

Reputation: 1

You can use:

sam deploy or sam.cmd deploy

This cmd works.

Upvotes: -2

UselesssCat
UselesssCat

Reputation: 2406

Do you tried sam.cmd?

Sometimes bash don't know how to execute .cmd files. Here is a thread with this problem.

You can try this solution too:

alias sam='sam.cmd'

Upvotes: 11

Related Questions