1 Answer
- Newest
- Most votes
- Most comments
0
Here is an example
from langchain_aws import BedrockLLM
llm = BedrockLLM(
credentials_profile_name="bedrock-admin", model_id="amazon.titan-text-express-v1"
)
from this source: https://python.langchain.com/v0.2/docs/integrations/llms/bedrock/
Note the credentials_profile_name parameter: Here it's definition.... param credentials_profile_name: Optional[str] = None The name of the profile in the ~/.aws/credentials or ~/.aws/config files, which has either access keys or role information specified. If not specified, the default credential profile or, if on an EC2 instance, credentials from IMDS will be used. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
Basically just create ~/.aws/credentials on the machine that is running your application in this format:
[default]
aws_access_key_id=foo
aws_secret_access_key=bar
aws_session_token=baz
answered 2 years ago
Relevant content
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 7 months ago
