2 Answers
- Newest
- Most votes
- Most comments
0
Hi,
I would suggest to directly use InvokeModel API call. - https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
To create signature for AWS requests you can refer to this documentation - https://docs.aws.amazon.com/IAM/latest/UserGuide/signing-elements.html
There is also a sigv4 tool for dart - https://aws.amazon.com/blogs/opensource/introducing-the-aws-sigv4-signer-for-dart/
0
I wrote an article about using v4Signer from Amplify. Its not specific to flutter, but the principles apply similarly. You will note that this example is calling a lambda function that is calling Bedrock.
answered a year ago
Relevant content
- asked 3 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 6 months ago

Hi,
thank you so much for your answer! This helped a lot. I have one more question though. I am not sure on how to handle authentication. Copying the keys from the aws console and copying them into env vars is not working well for me because they are only have short term validity. Do you know how the AWSCredentialsProvider.profile() constructor is supposed to work? I have completed all these steps with aws cli and have all the files in ~/.aws. When I run flutter with iOS Simulator I am getting:
Unhandled Exception: InvalidCredentialsException: Could not load credentials for profile "dev"