Skip to content

Feature/bedrock flow integration#28

Open
andrewwint wants to merge 2 commits into
aws-samples:mainfrom
andrewwint:feature/bedrock-flow-integration
Open

Feature/bedrock flow integration#28
andrewwint wants to merge 2 commits into
aws-samples:mainfrom
andrewwint:feature/bedrock-flow-integration

Conversation

@andrewwint

@andrewwint andrewwint commented Mar 18, 2025

Copy link
Copy Markdown

Issue #, if available:

Description of changes:

This PR adds an example integration of Amazon Bedrock Flow with AWS Amplify Gen 2, demonstrating how to build a chatbot using Next.js.

What does this example demonstrate?

  • Integration of Bedrock Flow with Amplify Gen 2 backend
  • Lambda function configuration for Flow invocation
  • IAM permission setup for secure Flow access
  • Schema integration with AppSync

Implementation Details

  1. Added new Lambda function (invokeFlow):

    • Handler for Bedrock Flow interaction
    • Resource configuration for Flow integration
  2. Updated backend configuration:

    • Added necessary IAM permissions in backend.ts
    • Integrated Flow with existing data schema
  3. Modified data layer:

    • Updated resource.ts to support Flow integration
    • Added schema definitions for chat functionality

Testing Completed

  • Tested locally with Amplify sandbox environment
  • Verified Lambda function successfully invokes Bedrock Flow
  • Confirmed IAM permissions are working correctly
  • Validated integration with AppSync schema

Additional Context

This implementation is based on a working example detailed in my blog article "How to Build a Chatbot with Amazon Bedrock Flow, AWS Amplify Gen 2, and Next.js". The article provides additional context and step-by-step implementation details.

Related Resources

  • Blog post with detailed implementation guide
  • Working example demonstrating the integration

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@andrewwint andrewwint force-pushed the feature/bedrock-flow-integration branch from ccd825f to 3cc0103 Compare March 21, 2025 11:43
@andrewwint andrewwint marked this pull request as draft March 21, 2025 11:44
@andrewwint andrewwint force-pushed the feature/bedrock-flow-integration branch from 3cc0103 to 42a6faa Compare March 21, 2025 11:53
- Add IAM policies for Bedrock Flow invocation
- Configure Knowledge Base data source and permissions
- Set up HTTP data source for Bedrock Agent Runtime
- Add IAM roles for authenticated users to access Bedrock flows
- Configure region-specific resources for KB and Flow services
@andrewwint andrewwint marked this pull request as ready for review March 21, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant