aws ssm send-command 报错 An error occurred (InvalidInstanceId) when calling the SendCommand operation

aws ssm

参考:https://docs.aws.amazon.com/zh_cn/systems-manager/latest/userguide/walkthrough-cli.html

  • 显示实例是否处于联机状态

aws ssm describe-instance-information --output text --query "InstanceInformationList[*]"
  • 获取实例的 IP 信息
# aws ssm send-command --instance-ids "xxx" --document-name "AWS-RunShellScript" --comment "IP config" --parameters commands=ifconfig --output text

An error occurred (InvalidInstanceId) when calling the SendCommand operation
# systemctl status amazon-ssm-agent

正常日志:[HealthCheck] HealthCheck reporting agent health.
异常日志:ERROR Health ping failed with error - NoCredentialProviders: no valid providers in chain. Deprecated.

解决

选中实例 -> 操作 -> 实例设置 -> 附加/替换 IAM 角色

IAM 角色要求的权限策略

  • AmazonEC2RoleforSSM
  • AmazonS3FullAccess
  • AmazonSSMAutomationRole
上一篇 Jenkins用户权限配置
下一篇 aws ssm send-command 执行无效果解决
目录
文章列表
1 CSharp 多线程通信
CSharp 多线程通信
2
XStream同名alias解析冲突
XStream同名alias解析冲突
3
Android实现仿银行APP回退至后台,并在通知栏里显示
Android实现仿银行APP回退至后台,并在通知栏里显示
4
Vue 3.0 初体验(项目搭建)
Vue 3.0 初体验(项目搭建)
5
jQuery模拟form表单提交
jQuery模拟form表单提交
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。