- 确认实例已经注册到 AWS Systems Manager 中,并已安装 SSM Agent。
- 确认在 AWS Systems Manager 中已经启用了 Patch Manager。
- 运行以下命令,查看具体错误信息:
aws ssm describe-available-patches --filters Key=PRODUCT,Values=RedhatEnterpriseLinux7 --region --output text 2>&1 | grep -i error
- 如果错误信息为 "This instance is not registered with SSM" 或者 "The AWS access key ID or secret access key is not valid",就需要注册或重新配置实例 SSM,并确保 AWS 访问密钥 ID 和密钥正确。
- 如果错误信息为 "PatchManager is not enabled for this instance",则需要启用 Patch Manager。
- 如果以上两步都正常,可以尝试升级 AWS CLI 版本或者检查当前用户名是否有足够的权限访问 AWS SSM API。