Hi,
Need assistant as im not able to AWS AI service comprehend, which says user is not authorized to perform action.
Thanks
Hi,
Need assistant as im not able to AWS AI service comprehend, which says user is not authorized to perform action.
Thanks
It’s because SCP (Service Control Policy) is implemented to block Comprehend:DetectDominantLanguage in your environment and it’s applicable to your username. Please talk to platform engineering team, they might help you!
Looks like @devops-vin is right, without that access right, AWS Comprehend no comprende nada, as it were. I’'ve written this up for engineering to fix.
Just an FYI,
It is happening for all AWS AI services, Comprehend, Transcribe, Textract, Translate, Rekognition.
Noted. I’ve added Transcribe to the same issue.
Kindly add Textract, Translate, Rekognition these too.
Hi KodeKloud Team,
Hope you had a good week! Just checking in on this issue.
Since I have to practice AWS AI services.
Thank You
Hi Karmitesh
Could you please check again?
And let me know, have enabled it from our side
Hi
Thank You. Kodekloud Team.
@rob_kodekloud / @TanishkaMarrott, relatedly, I am not able to use models permitted under Services on AWS AI Playground | KodeKloud
I am getting this error in my localhost terminal:
return new AuthenticationError(status, error, message, headers);
^
AuthenticationError: 401 User: arn:aws:iam::822233328238:user/kk_labs_user_504951 is not authorized to perform: bedrock-mantle:CreateInference on resource: arn:aws:bedrock-mantle:us-east-1:822233328238:project/default because no identity-based policy allows the bedrock-mantle:CreateInference action
at Function.generate (/Users/t25/Downloads/genai/node_modules/openai/src/core/error.ts:76:14)
at OpenAI.makeStatusError (/Users/t25/Downloads/genai/node_modules/openai/src/client.ts:494:28)
at OpenAI.makeRequest (/Users/t25/Downloads/genai/node_modules/openai/src/client.ts:745:24)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async <anonymous> (/Users/taran/Downloads/genai/src/index.ts:11:18) {
status: 401,
headers: Headers {},
requestID: 'req_lskvufom64ftqfqvz7zef37mieeqgdxnuls3w77jtqm4k7xfitva',
error: {
code: 'access_denied',
message: 'User: arn:aws:iam::822233328238:user/kk_labs_user_504951 is not authorized to perform: bedrock-mantle:CreateInference on resource: arn:aws:bedrock-mantle:us-east-1:822233328238:project/default because no identity-based policy allows the bedrock-mantle:CreateInference action',
param: null,
type: 'permission_denied_error'
},
code: 'access_denied',
param: null,
type: 'permission_denied_error'
}
What were you doing when you got this error message? It’s not clear what was not permitted or blocked in this case.
This was my index.ts file content:
I was just trying to see how llm responds
import dotenv from 'dotenv';
import OpenAI from 'openai';
dotenv.config();
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: process.env.OPENAI_BASE_URL,
});
const response = await client.chat.completions.create({
model: 'meta.llama3-2-3b-instruct-v1:0',
messages: [
{
role: 'user',
content:
'In a single sentence, why should someone choose KodeKloud over other platforms to learn DevOps?',
},
],
});
console.log(response.choices[0]?.message.content);
First of all, this thread was concerning AWS Comprehend, and you’re having problems with Bedrock – this should have been its own post, to prevent confusing folks with a question on a new topic.
PLEASE DO NOT DO THIS.
I’ll need to ask engineering what exactly they’re blocking here, since I’m seeing a similar error now that I get what you’re asking here ![]()
Comprehend and Bedrock were part of the same AWS AI playground
Got it, I’ll keep that in mind moving forward. As a new user who joined KodeKloud community a few hours ago, I’m still getting a feel for the community guidelines, though the ‘angry’ emoji was a bit of a surprising welcome.
Thanks for looking into the engineering side for me.
Sorry about the emoji – keeping topics separate saves time both for support people and for people looking for relevant topics, and while it’s the same playground, it’s a pretty different thing to debug. So avoiding posts that mix very different stuff is a very good thing ![]()
Once I knew what you were talking about, I needed to come up with an example for the engineers. Which wasn’t too bad, again, once I had a clue what your problem was.
No worries at all Rob, I’ll be more mindful moving forward ![]()
Thanks for taking a look, I really appreciate it!
Please let me know when the engineering team responds.