Documentation for locally running
I would like to locally host the docker container and pass the relevant environment variables, is this possible and do you have a list of the variables names which would be needed to allow access to AWS and any other mandatory config?
I tried to run it locally too, but without success.
@aaronbolton @lucasopedroso
You can successfully run the Bedrock Access Gateway by setting the necessary AWS and environment variables when launching the Docker container. Here's how I got it to work: First off, note that the application uses the boto3 library (AWS SDK for Python). Boto3 employs a credential discovery mechanism, searching for credentials in the following order: a) Environment variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY b) Shared credential file (~/.aws/credentials) c) AWS config file (~/.aws/config)
Running the Docker Container: To ensure proper credential access, launch the Docker container with the required environment variables as shown:
docker run -d --name bedrock_proxy \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret \
-e AWS_REGION=aws_region \
-p 8081:80 \
bedrock-proxy
Remember to change your environmental variable accordingly, port and all.
Integration with Open-WebUI: When configuring the model in Open-WebUI or similar interfaces, use the following endpoint: http://YOUR_IP:8081/api/v1
Replace 'YOUR_IP' with the appropriate IP address or hostname of your server.
Authentication: Use 'bedrock' as the password when prompted for authentication.
I hope this helps.
perfect thankyou
You're welcome. Remember to add the --restart flag to keep the docker container persistent when the server is rebooted.
For example, docker run -d --restart always --name bedrock and so on.
Thank you for the help, I've put it in a compose file next to my OpenWebUI container so I don't need to expose the port externally as well
Trying to run this locally.
Cloned the repo and build the _ecs Dockerfile.
Tryed to docker run it with the above parameters:
docker run -d --name bedrock_proxy \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret \
-e AWS_REGION=aws_region \
-p 8081:80 \
bedrock-proxy
but for some reason when trying to curl I get:
curl http://localhost:8000/api/v1 curl: (56) Recv failure: Connection reset by peer
Logs are not very helpful:
INFO] (rapid) exec '/var/runtime/bootstrap' (cwd=/var/task, handler=)
Your mapping port 8081 to 80 and then curling port 8000 you will need to curl 8081