windows - 如何在 Windows 上通过 bash 访问 AWS SAM-CLI?

标签 windows bash amazon-web-services command-prompt aws-cli

我运行的是 Windows 10,只能通过命令提示符而非 bash 访问 AWS SAM。当我尝试使用 bash 时,出现 bash: sam: command not found 错误。

如果有帮助,我目前已经安装了 AWS CLI v2 并通过 MSI 文件安装了它。

为什么我不能通过 bash 使用 SAM?

编辑:是的,我知道它没有明确说明您可以在 AWS 设置指南中使用 bash

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.

但是,我还是希望能够通过bash来使用它。有解决方法吗?

最佳答案

你试过sam.cmd了吗?

有时 bash 不知道如何执行 .cmd 文件。这是一个thread有这个问题。

你可以试试this solution也是:

alias sam='sam.cmd'

关于windows - 如何在 Windows 上通过 bash 访问 AWS SAM-CLI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62099966/

相关文章:

linux - 将文件上传到 sftp 的 bash 脚本

bash - SSH 文档 : bash prompt

python - 如何使用 Python 列出进程加载的所有 dll?

node.js - Yeoman - Gulp spawn cmd enoent

python - Pyautogui 屏幕截图。它去哪儿了?如何保存以后查找?

android - Windows 7上的Kivy开发环境

bash - Emacs shell 命令输出 "cannot set terminal process group"和 "no job control in this shell"

amazon-web-services - Istio ServiceEntry 用于将多个外部数据库连接到同一个数据库

amazon-web-services - OAI 与 AWS 上的 IAM 'users' 有什么区别?

amazon-web-services - 我应该使用哪个数据存储来存储来自搜寻器的临时数据?