媒体转换服务上的 AWS IAM 角色策略问题 [无法打开输入文件 [无法读取数据:AssumeRole 失败]]]
AWS IAM Role Policy Issue on Media Convert Service [ Cannot open input file [Failed to read data: AssumeRole failed]]]
我正在为 AWS IAM 角色策略而苦苦挣扎,我正在学习 Lambda 函数的教程,以便在上传新文件时从 s3 存储桶事件中读取并将其发送到 AWS MediaConvert 以转换视频文件。
Lambda 函数能够在测试中从 s3 读取,但它在 MediaConvert 的作业失败。
我已经为角色设置了策略并提供了内联策略,但我仍然无法让它工作。
AWS Elemental MediaConvert Screenshot
为 IAM 角色设置的策略
IAM Policies
Json 用于内联策略
lambda-s3-policy-inlinepolicy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ExampleStmt",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::aws-mybucket-01/*"
]
}
]
}
政策摘要
PolicySummaryImg
VodLambdaRole
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "*",
"Effect": "Allow",
"Sid": "Logging"
},
{
"Action": [
"iam:PassRole"
],
"Resource": [
"arn:aws:iam::myAccountID:role/my-lambda-role"
],
"Effect": "Allow",
"Sid": "PassRole"
},
{
"Action": [
"mediaconvert:*"
],
"Resource": [
"*"
],
"Effect": "Allow",
"Sid": "MediaConvertService"
},
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": "arn:aws:iam::myAccountID:role/my-lambda-role"
}
]
}
PolicySummary
确保分配给 MediaConvert 作业的 IAM 角色具有信任 MediaConvert 的信任策略:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "mediaconvert.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
这通常在您在管理控制台中创建 IAM 角色并将 select MediaConvert 作为服务时自动生成。
我正在为 AWS IAM 角色策略而苦苦挣扎,我正在学习 Lambda 函数的教程,以便在上传新文件时从 s3 存储桶事件中读取并将其发送到 AWS MediaConvert 以转换视频文件。 Lambda 函数能够在测试中从 s3 读取,但它在 MediaConvert 的作业失败。
我已经为角色设置了策略并提供了内联策略,但我仍然无法让它工作。
AWS Elemental MediaConvert Screenshot
为 IAM 角色设置的策略
IAM Policies
Json 用于内联策略
lambda-s3-policy-inlinepolicy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ExampleStmt",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::aws-mybucket-01/*"
]
}
]
}
政策摘要 PolicySummaryImg
VodLambdaRole
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "*",
"Effect": "Allow",
"Sid": "Logging"
},
{
"Action": [
"iam:PassRole"
],
"Resource": [
"arn:aws:iam::myAccountID:role/my-lambda-role"
],
"Effect": "Allow",
"Sid": "PassRole"
},
{
"Action": [
"mediaconvert:*"
],
"Resource": [
"*"
],
"Effect": "Allow",
"Sid": "MediaConvertService"
},
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": "arn:aws:iam::myAccountID:role/my-lambda-role"
}
]
}
PolicySummary
确保分配给 MediaConvert 作业的 IAM 角色具有信任 MediaConvert 的信任策略:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "mediaconvert.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
这通常在您在管理控制台中创建 IAM 角色并将 select MediaConvert 作为服务时自动生成。