Replies: 1 comment
-
the combination of your access key id, access key, and region are invalid. I'm guessing this key is likely disabled. If it is your key, you should delete it immediately because you have posted it online. instead of setting the key data with os.environ you should install the aws cli on your system and add a key there with 'aws configure'. Boto3 will then pull the details in automatically so you don't have to add sensitive key data to your code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
it prompts error
ClientError Traceback (most recent call last)
Input In [8], in <cell line: 1>()
----> 1 model_list = bedrock.list_foundation_models(byOutputModality='TEXT')['modelSummaries']
File c:\Users\YTX\Anaconda3\envs\leorobot\lib\site-packages\botocore\client.py:570, in ClientCreator._create_api_method.._api_call(self, *args, **kwargs)
566 raise TypeError(
567 f"{py_operation_name}() only accepts keyword arguments."
568 )
569 # The "self" in this scope is referring to the BaseClient.
--> 570 return self._make_api_call(operation_name, kwargs)
File c:\Users\YTX\Anaconda3\envs\leorobot\lib\site-packages\botocore\context.py:123, in with_current_context..decorator..wrapper(*args, **kwargs)
121 if hook:
122 hook()
--> 123 return func(*args, **kwargs)
File c:\Users\YTX\Anaconda3\envs\leorobot\lib\site-packages\botocore\client.py:1031, in BaseClient._make_api_call(self, operation_name, api_params)
1027 error_code = error_info.get("QueryErrorCode") or error_info.get(
1028 "Code"
1029 )
1030 error_class = self.exceptions.from_code(error_code)
-> 1031 raise error_class(parsed_response, operation_name)
1032 else:
1033 return parsed_response
ClientError: An error occurred (UnrecognizedClientException) when calling the ListFoundationModels operation: The security token included in the request is invalid.
what's the problem?
Beta Was this translation helpful? Give feedback.
All reactions