Skip to content

Instantly share code, notes, and snippets.

@sergenes
Last active December 10, 2023 15:04
Show Gist options
  • Save sergenes/f2f1e0b2478bfc45bba6916b7ae348aa to your computer and use it in GitHub Desktop.
Save sergenes/f2f1e0b2478bfc45bba6916b7ae348aa to your computer and use it in GitHub Desktop.
Terminal commands to configure the environment for direct access and access through Amazon Bedrock
# Setup commands you'll need to configure the environment
conda activate ~/opt/anaconda3
~/opt/anaconda3/bin/conda install -p ~/opt/anaconda3 anthropic -y
pip install anthropic
pip install ai21
pip install openai
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
aws --version
aws-cli/2.14.1 Python/3.11.6 Darwin/23.0.0 exe/x86_64 prompt/off
# configure aws credentials
aws configure
aws sts get-caller-identity
{
"UserId": "12345678901",
"Account": "12345678901",
"Arn": "arn:aws:iam::12345678901:root"
}
vi ~/.aws/credentials
# check the available models by provider [meta/anthropic/ai21/etc.]
aws bedrock list-foundation-models --by-provider meta --query "modelSummaries[*].modelId"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment