我能够在 aws 控制台上执行一些操作(特别是使用 cloudwatch 洞察力并运行查询)。但是我无法使用 aws cli 或 boto3(aws 日志启动查询)来做同样的事情。它给出了 AccessDeniedError。但是我能够运行其他命令,例如 aws s3 ls。控制台和cli的权限不是相同的吗?
确切的错误是
An error occurred (AccessDeniedException) when calling the StartQuery operation: User: arn:aws:sts::----:assumed-role/---- is not authorized to perform: logs:StartQuery on resource: arn:aws:logs:----
我应该如何调试这个问题。