- Newest
- Most votes
- Most comments
It looks like you are using the access key but doing the Assume role.
Normally, the IAM user would be the executing user.
Is the AWS account listed in the ARN below the one you are using?
If correct, try setting the policy to the IAM role called aws-lambda-execute.
arn:aws:sts::650953327525:assumed-role/aws-lambda-execute/bb1f13f7ade41dcdc6e829bcb190797999bf7ed69e873b772ad3ab439c745868
I guess the problem is that when hosting the web app on Netlify or Vercel, they load any API methods defined in the web app into Lambda as a serverless function. This creates an issue that is not faced when running the web app on the local development environment.
- In any case, I create a new IAM Role "TextractorWebhook" with full permissions to Textract.
I also added a trust relationship in the role, for my IAM user "developer" to assume it: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::169693454259:user/developer" }, "Action": "sts:AssumeRole" } ] }
Unfortunately, that doesn't seem to solve the problem, as I am getting this error message: AccessDenied: User: arn:aws:sts::169693454259:assumed-role/TextractorWebhook/TextractWebhookSession is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::169693454259:role/TextractorWebhook
- I added a new inline policy to the user "developer" named "STSAssumeRolePolicy" to grant all "sts" actions { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor1", "Effect": "Allow", "Action": "sts:*", "Resource": [ "arn:aws:iam::169693454259:role/TextractorWebhook" ] } ] }
But again, this has not resolved the problem. I get the same error message.
What else am I missing here?
Relevant content
- AWS OFFICIALUpdated 9 months ago
