Amazon Bedrock Example Implementation

Content Type: Module
Categories: Connectors,AWS,Artificial Intelligence

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:
  1. In the top-right corner of the overview, click on Edit.
  2. checkbox should appear next to each model. Select the models you wish to access with your credential set by checking the appropriate boxes.
  3. 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:

  1. 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.
  2. The model you are trying to invoke is deprecated. Please confirm that the model-id you specified is currently available in Amazon Bedrock.







Releases

Version: 2.1.0
Framework Version: 9.18.0
Release Notes: - Improved/streamlined Examples. - Compatible with AWS Authentication Connector 3.0.0 and higher. - Compatible with Amazon Bedrock Connector 2.1.3.
Version: 2.0.0
Framework Version: 9.18.0
Release Notes: - Updated the module to be compatible with the 2.0.0 version of the Amazon Bedrock Connector - Attention this version of the Example Implementation is not compatible with previous version of the AWS Authentication, and Amazon Bedrock connector
Version: 1.0.1
Framework Version: 9.18.0
Release Notes: New features - We added an example implementation for the following models: ai21.j2-grande-instruct, ai21.j2-jumbo-instruct, ai21.j2-mid-v1, ai21.j2-ultra-v1, cohere.command-text-v14, stability.stable-diffusion-xl-v0
Version: 1.0.0
Framework Version: 9.18.0
Release Notes: Initial release