如何使用 aws pi 命令解决错误“服务类型 RDS 的资源 mydb1 未授权用于此账户”

How do I resolve the error "The resource mydb1 for service type RDS is not authorized for this account" with aws pi command

提问人:Sonny N 提问时间:11/16/2023 最后编辑:Sonny N 更新时间:11/17/2023 访问量:11

问:

我使用默认的 AWS 配置文件拥有管理员访问权限。我使用的是最新版本的 AWS CLI 模块,它是版本 2.13.36。当我运行以下CLI命令时:

aws pi list-performance-analysis-reports --service-type RDS --identifier "mydb1"

我收到以下错误:

An error occurred (NotAuthorizedException) when calling the ListPerformanceAnalysisReports operation: The resource mydb1 for service type RDS is not authorized for this account

我不确定我会给自己更多的访问权限。有没有人使用“aws pi”命令有任何成功?

我还尝试通过 Performance Insights 仪表板创建报告,但我没有看到将其保存到报告中的方法。我可以访问 Performance Insights 并与图表进行交互,但看不到将其保存到报告中的方法。

amazon-web-services 命令行界面 数据库性能

评论

0赞 Arpit Jain 11/16/2023
也许,在调用 aws 服务时,您可以运行以验证用于验证请求的 IAM 身份。aws sts get-caller-identity
1赞 Sonny N 11/17/2023
感谢@ArpitJain,它使用与我预期的相同的身份,即我访问 AWS 控制台的相同身份。我确实收到了 AWS 的回复,事实证明,此功能(报告)仅适用于付费 Performance Insights 套餐,而不适用于我使用的免费套餐。我将很快对其进行验证,并将发布我的发现。
1赞 Sonny N 11/22/2023
从 AWS 获得了更多说明。此功能称为“分析一段时间的数据库性能”,根据此页面,它仅支持 RDS/PostgreSQL。我试图在RDS / MSSQL上做到这一点。希望这对其他试图做同样事情的人有所帮助。
0赞 Arpit Jain 11/22/2023
您可以将其发布为答案:)因此,其他人也可以。

答: 暂无答案