2

我有以下 AssumeRolePolicyDocument:

                            {
                              "Version": "2012-10-17",
                              "Statement": {
                                "Effect": "Allow",
                                "Principal": {"Service": "comprehend.amazonaws.com"},
                                "Action": "sts:AssumeRole"
                              }
                            }

和以下政策文件:

{
                                  "Version": "2012-10-17",
                                  "Statement": {
                                    "Effect": "Allow",
                                    "Action": "s3:GetObject",
                                    "Resource": "arn:aws:s3:::${bucket.name}/*"
                                  }
                                }

不幸的是,我从 Amazon Comprehend 得到的是NO_READ_ACCESS_TO_INPUT: The provided data access role does not have proper access to the input data.. 怎么了?

完整的源代码在这里:https ://github.com/SnipHubNet/SnipHubNet.github.io/blob/master/snippets/201902/src/test/kotlin/AmazonComprehend3Snippet.kt

4

1 回答 1

0

找到原因:必须等待一段时间(比如说30秒),然后comprehend才能访问新创建的bucket和policy。

于 2019-02-28T10:30:38.277 回答