- Newest
- Most votes
- Most comments
Hi,
Did you programmatically check the identity under which you run the Python script ?
Please, do it, either via CLI on the machine where you run Python. Use https://docs.aws.amazon.com/cli/latest/reference/sts/get-caller-identity.html
Or (better), modify the python code to add:
import boto3
boto3.client('sts').get_caller_identity().get('Account')
Best,
Didier
The "Operation not allowed" error you're encountering is likely related to model access permissions in Amazon Bedrock. Even though you have full account permissions via your IAM policy, you still need to explicitly enable access to the specific foundation models you want to use in Amazon Bedrock.
To resolve this issue:
- Navigate to the Amazon Bedrock console
- In the navigation pane, expand "Bedrock configurations" and select "Model access"
- Check the "Access status" column for the models you're trying to use (Nova Lite in your case)
- If the model is not enabled, you need to request access to it
Additionally, make sure that:
- You're in the correct region (eu-west-1) and that the model you're trying to use is available in that region
- If your organization uses Service Control Policies (SCPs), check if there are any explicit denies for AWS Marketplace actions, as these can prevent access to Bedrock foundation models
For the AgentCore Gateway specifically, verify that:
- The execution role has the necessary permissions to invoke the model
- The trust relationship for the role is properly configured to allow bedrock.amazonaws.com to assume the role
If you continue to experience issues, you can check CloudTrail event history for more detailed error information about what might be causing the "Operation not allowed" error.
Sources
Amazon Bedrock batch job: Validation Error: Operation Not Allowed | AWS re:Post
Resolve access denied errors for Amazon Bedrock Agents | AWS re:Post
Resolve SCP conflicts that prevent access to Amazon Bedrock | AWS re:Post
Troubleshoot AgentCore built-in tools - Amazon Bedrock AgentCore
It is definitely not related to model access permissions in Amazon Bedrock.
According to the message in that Bedrock console screen: https://eu-west-1.console.aws.amazon.com/bedrock/home?region=eu-west-1#/modelaccess
Model access page has been retired Access to all serverless foundation models are now automatically enabled for your AWS account. You no longer need to manually request or enable model access through this page. Use IAM policies and Service Control Policies to restrict model access as needed.
To get started, simply select a model from the Model catalog and open it it in the playground. Note that for Anthropic models, some first-time users may need to submit use case details before they can access the model. Review our documentation for the complete list of available models.
Did you find a solution?
Relevant content
- asked 3 months ago
- AWS OFFICIALUpdated 9 months ago

Thanks Didier, for prompt response it was not roles or permissions as same error happens in AWS Bedrock console (as mentioned in the initial post).
Looks like it is account related, probably because account was created just 2 days ago (for my Talk on AWS Community Day this weekend), and is somehow restricted for now.
GOOD NEWS: Another account in same org with same user and permissions successfully allows invocation of models in EU.
Happy to try any other suggestions.