简体   繁体   English

AWS SSM 未被识别为命令

[英]AWS SSM not recognized as a command

I have installed AWSCLI and session-manager on my Ubuntu instance and confirmed the installation based on the guides.我已经在我的 Ubuntu 实例上安装了 AWSCLI 和 session-manager,并根据指南确认了安装。 I also configured my instance using aws configure.我还使用 aws configure 配置了我的实例。 Now when I use现在当我使用

aws ssm start-session --target [target_instance_id]

But I get the error below:但我收到以下错误:

usage: aws [options] [...] [parameters] To see help text, you can run: aws help aws help aws help aws: error: argument operation: Invalid choice, valid choices are....用法:aws [options] [...] [parameters] 要查看帮助文本,您可以运行: aws help aws help aws help aws: error: argument operation: Invalid choice, valid selection are....

Which tells me ssm is not configured properly.这告诉我 ssm 配置不正确。 How can I resolve this?我该如何解决这个问题?

You need to update awscli using this command您需要使用此命令更新 awscli

sudo pip install --upgrade awscli

I had both CLI v1 and v2 installed.我安装了 CLI v1 和 v2。 Using aws defaulted to v1, which doesn't support what I needed to do.使用aws默认为 v1,它不支持我需要做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM