https://promptfoo.dev/ logo
aws bedrock is not working with vpc endpoint getti...
# ❓|questions
r
with out vpce its working
m
Can you please share the relevant part of your AWS bedrock config? Are you experiencing a more specific error?
r
no
when i update my iam policy with vpce i am getting error
with boto3 iam policy is working
m
Are you able to use bedrock outside of promptfoo (if you call it directly from python or javascript)?
r
iam policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "bedrock:Get*", "bedrock:List*", "bedrock:Invoke*" ], "Resource": "*", "Condition": { "StringEquals": { "aws:sourceVpce": "vpce-xxxxx" } } } ] }
promptfoo error API error: 403 Forbidden {"error":{"message":"bedrock error: The security token included in the request is invalid.","type":null,"param":null,"code":null},"provider":"bedrock"}
m
If you are able to use it outside of promptfoo, as a workaround I recommed setting up a python or javascript provider. I can spend 2 minutes with you on a call now if you are free
It looks like there's a header that's being lost somewhere
r
yeah if i remove vpce from policy it will work with prompfoo
m
r
pls allow me 30 min i am in meeting
m
ok write when you are done and i'll send a new link
r
hey i can provide high level info
but we cant connect as per my company policy
m
ok, I recommend setting up a custom python or javascript provider as a workaround https://www.promptfoo.dev/docs/providers/python/ https://www.promptfoo.dev/docs/providers/custom-api/
r
thanks for sharing
do u have sample script for bedrock
m
2 Views