我正在尝试在目标组上运行此 cli:
aws elbv2 describe-target-health
此 IAM 政策不起作用:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1497933736509",
"Action": [
"elasticloadbalancing:DescribeTargetHealth"
],
"Effect": "Allow",
"Resource": "arn:aws:elasticloadbalancing:::*"
}
]
}
错误信息:
An error occurred (AccessDenied) when calling the DescribeTargetHealth operation
这有效:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1497933977893",
"Action": [
"elasticloadbalancing:DescribeTargetHealth"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
问题:为什么我必须使用 * 来包含所有 AWS 资源?我在这里错过了什么明显的东西吗?