无法承担处理AWS Comprehend Job的角色

时间:2018-12-17 13:35:05

标签: amazon-web-services role-based-access-control

使用AWS的控制台向导创建一个Comprehend Job,该作业超时并失败,并显示以下消息:

Unable to assume the role 'arn:aws:iam::099999999:role/service-role/AmazonComprehendServiceRole-xxxxx'

我允许向导创建角色。看起来像这样:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::MYBUCKET1/*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::MYBUCKET1"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::MYBUCKET2/*"
        }
    ]
}

我正在通过控制台以root用户身份创建作业。

在那之后行不通,我在底部添加了一个新节点-也是徒劳的:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::MYBUCKET1/*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::MYBUCKET1"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::MYBUCKET2/*"
        },
        {
            "Sid": "AllowDetectActions",
            "Effect": "Allow",
            "Action": [
                "comprehend:DetectEntities",
                "comprehend:DetectKeyPhrases",
                "comprehend:DetectDominantLanguage",
                "comprehend:DetectSentiment"
            ],
            "Resource": "*"
        }
    ]
}

0 个答案:

没有答案