RAG Chat for Amazon Bedrock
RAG Chat for Amazon Bedrock is a WordPress plugin that seamlessly integrates your WordPress content with Amazon Bedrock Knowledge Bases to create an intelligent RAG (Retrieval-Augmented Generation) chatbot system.
Key Features:
- Direct Amazon Bedrock Integration: Connects directly to Amazon Bedrock Knowledge Bases without external servers
- Automatic Content Synchronization: Automatically syncs WordPress posts and pages to Amazon Bedrock when content is created, updated, or deleted
- Real-time Chat Interface: Provides a chat widget for visitors to interact with your content using AI
- Comprehensive Admin Interface: Four dedicated admin pages for configuration and content management
- AWS Security: Uses AWS Signature Version 4 authentication for secure API communication
- Content Management: Track sync status and manage which content is synchronized to Amazon Bedrock
How It Works:
- Configure your AWS credentials and Amazon Bedrock Knowledge Base in the plugin settings
- New WordPress posts and pages are automatically synchronized to Amazon Bedrock when saved or deleted
- Existing content can be synchronized using the export function in the Content Management page
- Visitors can use the chat interface to ask questions about your content
- Amazon Bedrock retrieves relevant content and generates intelligent responses using your WordPress data
Requirements:
- AWS account with Amazon Bedrock access
- Amazon Bedrock Knowledge Base configured
- Valid AWS credentials (Access Key ID and Secret Access Key)
Demo:
See the plugin in action: Live Demo
Troubleshooting
Plugin Installation & Setup Issues
Plugin activation fails
- Ensure your WordPress version meets the minimum requirement (6.6+)
- Check that your PHP version is 7.4 or higher
- Verify there are no plugin conflicts by temporarily deactivating other plugins
The chat interface doesn’t appear on my page
- Make sure you’ve inserted the shortcode
[rag_chat_ab_chat]in the correct location - Check that the plugin is activated
- Verify your AWS credentials are correctly configured in the plugin settings
Content Synchronization Issues
Content sync is failing
- Verify your AWS credentials have the correct permissions
- Check that your Knowledge Base ID and Data Source ID are correct
- Ensure your Knowledge Base has a “Custom” type data source
- For existing content, use the “Export Posts and Pages to Amazon Bedrock” feature on the Content Management page
Export operation times out
If you have many posts and pages, “Export Posts and Pages to Amazon Bedrock” may take a long time and cause timeout errors depending on your PHP settings. To reduce the risk of timeout:
- Export content in smaller batches by selecting specific date ranges
- Consider increasing your PHP execution time limit if you have server access
- Contact your hosting provider if timeout issues persist
- For large-scale exports, we offer a dedicated bulk export PHP script that runs independently on your server and can handle large volumes of content without web browser timeout limitations. Contact us at https://tally.so/r/3jjoga for more information about our bulk export solution
AWS Authentication & Permissions
AWS permission errors
- Double-check all required IAM permissions are granted to your user
- Verify your AWS Access Key ID and Secret Access Key are correct
- Ensure your AWS account has access to Amazon Bedrock in the selected region
- Check the AWS CloudTrail logs for detailed error information
AWS Marketplace subscription error
If you encounter “Model access is denied” with “aws-marketplace:ViewSubscriptions” permission errors:
- Your IAM user needs the
aws-marketplace:ViewSubscriptionspermission - Add this permission to your IAM user’s policy
- Wait 15 minutes after fixing the permissions before trying again
- This is required for AWS Marketplace subscription completion
Model Access & Configuration
Model use case details required
If you encounter an error like “Model use case details have not been submitted for this account. Fill out the Anthropic use case details form before using the model”:
- Anthropic requires use case details before using their models
- Fill out the Anthropic use case details form in your AWS console
- Wait 15 minutes after submitting before trying again
- See the AWS documentation: https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html
Inference profile required error
If you get an error like “Invocation of model ID anthropic.claude-haiku-4-5-20251001-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile”:
- Some models require using inference profiles instead of direct model invocation
- Use the ID or ARN of an inference profile that contains the model
- Configure inference profiles in your Amazon Bedrock settings
- See the AWS documentation: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
Chat responses are not working
- Verify that your AWS region is correct in the plugin settings
- Check that your Knowledge Base contains synchronized content
- Ensure your IAM user has
bedrock:RetrieveAndGeneratepermissions - Try asking questions related to your synchronized content
External services
This plugin uses the following Amazon Bedrock API endpoints provided by Amazon Web Services, Inc.:
- PUT https://bedrock-agent.{$region}.amazonaws.com/knowledgebases/{$knowledge_base_id}/datasources/{$data_source_id}
- Called when a post or page is created or updated.
- Used to add / update content on Amazon Bedrock.
- The whole content (post or page) is sent.
- POST https://bedrock-agent.{$region}.amazonaws.com/knowledgebases/{$knowledge_base_id}/datasources/{$data_source_id}/documents/deleteDocuments
- Called when a post is deleted or moved to trash.
- Used to delete content from Amazon Bedrock.
- Only the post / page ID is sent.
- POST https://bedrock-agent-runtime.{$region}.amazonaws.com/retrieveAndGenerate
- Called when a visitor asks a question.
- Used to generate responses using Amazon Bedrock’s AI.
- The query that the user enters is sent.
- The response contains a session ID, and it will be send to this endpoint in the subsequent requests along with the query.
Please see the following links for more information about Amazon Web Services:
Related Projects
This plugin is based on WP RAG (https://github.com/mobalab/wp-rag), which provides RAG functionality using external servers and OpenAI’s APIs. RAG Chat for Amazon Bedrock offers a different approach by integrating directly with Amazon Bedrock Knowledge Bases for users who prefer AWS-native solutions.