Hi am getting permission issues while creating knowledge base in bedrock.
Error
Knowledge base: kb-influencer-test was failed to create. undefined User: arn:aws:iam::1234:user/xxxx@gmail.com is not authorized to perform: iam:CreatePolicyVersion on resource: policy AmazonBedrockS3PolicyForKnowledgeBase_xyz because no identity-based policy allows the iam:CreatePolicyVersion action
Following is the inline policy that is attached to the user.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreatePolicy",
"iam:CreatePolicyVersion",
"iam:PassRole",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"iam:AttachRolePolicy"
],
"Resource": "arn:aws:iam::1234:policy/AmazonBedrockS3PolicyForKnowledgeBase_xyz"
}
]
}
Any pointers would be appreciated.