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.
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/ConverseAPIs — 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_RUNTIMEis not present, so aBedrock data source can't be declared today.
Proposal
AMAZON_BEDROCK_RUNTIMEtoDATASOURCE_TYPESand the data source validation.AWS::AppSync::DataSourcewithType: AMAZON_BEDROCK_RUNTIME. (CloudFormation listsit as an allowed
Type; there is no extra*Configblock on the data source itself.)bedrock:InvokeModel(andbedrock:Converse) for therelevant model/inference-profile ARNs when no
serviceRoleArnis provided — mirroring howthe existing data sources build their default roles in
src/resources/DataSource.ts. Allowthe user to scope the model ARN(s).
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_JSruntime (
BedrockInvokeModelRequest/ Converse) — that's user resolver code, alreadysupported; this ticket is only about declaring the data source + role.