Git Product home page Git Product logo

appsync-bedrock-subscription's Introduction

AppSync subscriptions with Bedrock response stream API

Goal

The goal of this repository is to showcase the ability of directly connecting to Bedrock response stream endpoint via Appsync Subscription without any Lambda.

The integration is done via HTTP Data source and the result can be consumed as the response of a subscription in the web app's console.

Appsync Subscription with Bedrock integration

Configuration

Deploy the application:

cd backend
cdk deploy

Grab the cdk output in the console and fill the parameters in _app.tsx

Amplify.configure({
    aws_appsync_graphqlEndpoint:
      'https://XXXXX.appsync-api.<REGION>.amazonaws.com/graphql',
    aws_appsync_region: 'us-west-2',
    aws_appsync_authenticationType: 'API_KEY',
    aws_appsync_apiKey: 'da2-YYYYYY'
  })

Now run:

npm run dev

And connect to the app url.

When calling the invoke mutation via the AWS web console or external client, the result will be streamed to the console in the nextjs app.

appsync-bedrock-subscription's People

Watchers

 avatar

Forkers

me-sunil

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.