我正在使用boto3,尝试使用Cost Explorer获取成本和使用情况。
import boto3
client = boto3.client('ce')
client.get_cost_and_usage()
已将以下权限授予用户
"aws-portal:ViewUsage",
"aws-portal:ViewBilling"
然而总是出现错误
执行GetCostAndUsage操作时发生错误(AccessDeniedException):用户arn:aws:iam::123456789:user/User1未被授权在资源arn:aws:ce:us-east-1:123456789上执行ce:GetCostAndUsage操作。