stepfunction 的 AWS 服务委托人值是多少?

What is the AWS Service Principal value for stepfunction?

我正在编写用于为 AWS StepFunctions 创建 IAM 角色的 terraform。 assume_role_policy

Principal 的值应该是多少
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "stepfunctions.amazonaws.com"
      },
      "Effect": "Allow",
      "Sid": ""
    }
  ]
}

我遇到了错误

Error: Error creating IAM Role my_utility_sfn: MalformedPolicyDocument: Invalid principal in policy: "SERVICE":"stepfunctions.amazonaws.com"

service endpoints 的 AWS 文档应该包含答案。

好像是states.<region>.amazonaws.com

校长是states.<region>.amazonaws.com :

https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-lambda-state-machine-cloudformation.html#lambda-state-machine-cfn-create-role