2

I have the following AssumeRolePolicyDocument:

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

and the following PolicyDocument:

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

Unfortunately what I get from Amazon Comprehend is NO_READ_ACCESS_TO_INPUT: The provided data access role does not have proper access to the input data.. What's wrong?

The full source code is here: https://github.com/SnipHubNet/SnipHubNet.github.io/blob/master/snippets/201902/src/test/kotlin/AmazonComprehend3Snippet.kt

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
iirekm
  • 8,890
  • 5
  • 36
  • 46

1 Answers1

0

Found the reason: have to wait a bit (let's say 30 seconds), before comprehend can access the newly-created bucket and policy.

iirekm
  • 8,890
  • 5
  • 36
  • 46