Skip to content

Support Amazon Bedrock runtime data source (AMAZON_BEDROCK_RUNTIME) #727

@sid88in

Description

@sid88in

Feature

AWS AppSync added Amazon Bedrock runtime as a data source type (announced Nov 21, 2024),
letting GraphQL resolvers make short (<=10s) synchronous calls to Bedrock foundation models
via the InvokeModel / Converse APIs — the "AI gateway" pattern.
https://aws.amazon.com/about-aws/whats-new/2024/11/aws-appsync-ai-gateway-bedrock-integration-appsync-graphql/

Current state (verified)

The plugin's DATASOURCE_TYPES (src/validation.ts) is:
AMAZON_DYNAMODB, AMAZON_OPENSEARCH_SERVICE, AWS_LAMBDA, HTTP, NONE,
RELATIONAL_DATABASE, AMAZON_EVENTBRIDGE. AMAZON_BEDROCK_RUNTIME is not present, so a
Bedrock data source can't be declared today.

Proposal

  • Add AMAZON_BEDROCK_RUNTIME to DATASOURCE_TYPES and the data source validation.
  • Emit AWS::AppSync::DataSource with Type: AMAZON_BEDROCK_RUNTIME. (CloudFormation lists
    it as an allowed Type; there is no extra *Config block on the data source itself.)
  • Generate a default service role with bedrock:InvokeModel (and bedrock:Converse) for the
    relevant model/inference-profile ARNs when no serviceRoleArn is provided — mirroring how
    the existing data sources build their default roles in src/resources/DataSource.ts. Allow
    the user to scope the model ARN(s).
  • Docs + an example under examples/.

Notes / scope

This fits the existing data-source pattern cleanly (it's "just another Type" plus a role),
so it's a good, contained first issue. Resolvers invoke Bedrock through the APPSYNC_JS
runtime (BedrockInvokeModelRequest / Converse) — that's user resolver code, already
supported; this ticket is only about declaring the data source + role.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions