BYOK - Please add tutorial for Using Custom Models in Github Copilot with AWS Bedrock #193259
Replies: 2 comments
-
|
Bedrock BYOK works but it's finicky. Four things to check, in order of likelihood:
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"bedrock:GetInferenceProfile"
],
"Resource": "*"
}For cross-region inference profiles you also need invoke permission on the profile's underlying model ARNs in each region the profile routes to. While you debug, Fastest way to isolate it: run the exact same call from your terminal with the exact same AWS credentials: aws bedrock-runtime invoke-model \
--model-id us.anthropic.claude-3-5-sonnet-20241022-v2:0 \
--region us-east-1 \
--body '{"anthropic_version":"bedrock-2023-05-31","max_tokens":100,"messages":[{"role":"user","content":"hi"}]}' \
--cli-binary-format raw-in-base64-out \
out.jsonIf that 500s too, it's AWS-side (IAM, model access, region, or model ID format). Fix that first, the Copilot integration will light up afterwards. If the CLI works but Copilot still 500s with the same creds and model ID, open a support ticket and include both request IDs you already have, since Bedrock BYOK is still in public preview and a few integration edge cases are getting ironed out. |
Beta Was this translation helpful? Give feedback.
-
|
thanks @Gecko51 I tried the above steps before submitting this ticket. I also tested the setup and chatted with the model on Bedrock locally using a script, and only GitHub Copilot is returning a 500 error. Thank you for your assistance. I will create a separate support ticket. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Copilot in GitHub
Body
Following this tutorial: https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-organization/use-your-own-api-keys
Please add more detail guiding to config with AWS Bedrock.
I have tried to config bedrock with long-term api keys, but when chatting, I got error as below:
I need detail for bedrock config.
Beta Was this translation helpful? Give feedback.
All reactions