Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅
中国的 Amazon Web Services 服务入门
(PDF)。
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
以下示例模板显示了如何 Amazon Step Functions 要求您根据状态机定义中的资源设置 IAM 策略。您可以使用 IAM 控制台添加任何缺少的角色策略。有关更多信息,请参阅 集成服务的 IAM 策略 和 服务集成模式。
由于 MediaConvert 为资源级访问控制提供了部分支持,因此您必须使用。"Resource": "*"
- Run a Job (.sync)
-
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"mediaconvert:CreateJob",
"mediaconvert:GetJob",
"mediaconvert:CancelJob"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"events:PutTargets",
"events:PutRule",
"events:DescribeRule"
],
"Resource": [
"arn:aws:events:[[region]]
:[[accountId]]
:rule/StepFunctionsGetEventsForMediaConvertJobRule"
]
}
]
}
- Request Response
-
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"mediaconvert:CreateJob"
],
"Resource": "*"
}
]
}