Amazon Bedrock Example Implementation
Overview
Amazon Bedrock Example Implementation
The definitive reference for Mendix Developers eager to harness the capabilities of Amazon's generative AI service, Amazon Bedrock. This example implementation illustrates a single-turn chat, offering precise question-answering mechanisms to enhance user interactions. Essential for those looking to be at the forefront of AI integration in Mendix. This example app integrates with Amazon Bedrock using the Amazon Bedrock Connector.
As a note of caution, given that StabilityAI's StableDiffusion XL model & Amazon's Titan Text G1 are currently in preview within Amazon Bedrock, the request and response structure may undergo changes.
This app includes an example implementation for the following Amazon Bedrock models categorized by model provider:
AI21
- Grande Instruct
- Jumbo Instruct
- Mid
- Mid v1
- Ultra
- Ultra v1
Amazon
- Titan Large
Anthropic
- Claude Instant v1
- Claude v1
- Claude v2
Cohere
- Command
StabilityAI
- Stable Diffusion XL
- Stable Diffusion XL v0
Stay ahead and inspire with the power of AI-driven conversations in your Mendix applications.
Documentation
Getting started
To kickstart your AI journey, ensure you have:
- Mendix Studio Pro (9.18.0 or newer)
- AWS Authentication Connector (3.0.0 or newer)
- Amazon Bedrock Connector (2.0.0 or newer)
- Community Commons (10.0.0 or newer)
- Means to authenticate into the AWS ecosystem (Credential set or IAM role anywhere)
Troubleshooting
400: Bad Request
- Your AWS organization may not have been granted access to the model you're trying to invoke. Navigate to your Model Access in your Amazon Bedrock environment (note this is in the Oregon region [us-west-2]). In this overview you'll find the available models and your status towards each of them, ideally the status should be Access Granted. If the status is Available, this means that you can enable access to this model for your AWS organization. To do this follow these steps:
- In the top-right corner of the overview, click on Edit.
- A checkbox should appear next to each model. Select the models you wish to access with your credential set by checking the appropriate boxes.
- Once you've made your selections, navigate to the bottom-right corner and click Save Changes.
It may take a few minutes before the status changes, after which it should say Access Granted.
404: Resource not found
When invoking a model the error code 404 indicates that the targeted resource was not found.
Possible root causes for this error include:
- You don't have access to the model in the specified AWS region. Make sure to select the AWS Region where you have model access. You have an overview of models accessible to you in the AWS Management Console, in the Model Access section of your Amazon Bedrock environment.
- The model you are trying to invoke is deprecated. Please confirm that the model-id you specified is currently available in Amazon Bedrock.