步骤函数的 AWS 策略:某些操作、资源或条件不提供权限

问题描述 投票:0回答:1

我正在编辑策略文档以允许 Lambda 执行步骤函数。下面的语句虽然授予了正确的权限,但会导致出现警告。如果这是“误报”警告,或者我实际上错误配置了策略文档,我需要建议。

导致警告的语句:

    {
      "Sid": "VisualEditor2",
      "Effect": "Allow",
      "Action": [
        "states:SendTaskSuccess",
        "states:SendTaskFailure"
      ],
      "Resource": "arn:aws:states:eu-central-1:xxxxxxxxxxxx:stateMachine:sample-waiting-step-machine"
    }

警告文字:

This policy defines some actions, resources, or conditions 
that do not provide permissions. To grant access, policies 
must have an action that has an applicable resource or condition. 
For details, choose Show remaining.

一旦我勾选“显示剩余服务”,表中也会显示以下警告:

感谢所有建议!

amazon-iam aws-step-functions
1个回答
0
投票

操作

states:SendTaskSuccess
states:SendTaskFailure
仅支持所有资源通配符('*')。从 IAM 策略编辑器中,您可以验证这一点:-

在 AWS 文档中,如果您看到操作 SendTaskFailure

SendTaskSuccess
的 AWS Step Functions 的
操作表
,则资源类型列为空。文档指出:

“资源类型”列指示操作是否支持资源级权限。如果该列为空,则该操作不支持资源级权限,您必须在策略中指定所有资源(“*”)

我希望这有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.