-
Notifications
You must be signed in to change notification settings - Fork 936
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create apigw-lambda-bedrock-java.json
json file for publishing.
- Loading branch information
Showing
1 changed file
with
84 additions
and
0 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
apigw-lambda-bedrock-cdk-java/apigw-lambda-bedrock-java.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"title": "Amazon API Gateway to AWS Lambda to Amazon Bedrock", | ||
"description": "Make a request to Bedrock via API Gateway using Java and CDK", | ||
"language": "Java", | ||
"level": "200", | ||
"framework": "CDK", | ||
"introBox": { | ||
"headline": "How it works", | ||
"text": [ | ||
"Amazon API Gateway receives the HTTP POST request containing the prompt.", | ||
"AWS Lambda is triggered by the API Gateway, this function forwards the prompt to Amazon Bedrock API using AWS SDK for Java. It uses Anthropic Claude-v2 model and sets other required parameters to fixed values for simplicity.", | ||
"Based on the given prompt, using Anthropic Claude-v2 model, Amazon Bedrock generates the content and returns the response to Lambda.", | ||
"Lambda processes the Bedrock output and sends it back to the user via the API Gateway." | ||
] | ||
}, | ||
"gitHub": { | ||
"template": { | ||
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/apigw-lambda-bedrock-cdk-java", | ||
"templateURL": "apigw-lambda-bedrock-cdk-java", | ||
"projectFolder": "apigw-lambda-bedrock-cdk-java", | ||
"templateFile": "infrastructure/src/main/java/com/example/InfrastructureApp.java" | ||
} | ||
}, | ||
"resources": { | ||
"bullets": [ | ||
{ | ||
"text": "Amazon Bedrock Model Access", | ||
"link": "https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html" | ||
} | ||
] | ||
}, | ||
"deploy": { | ||
"text": [ | ||
"cdk deploy" | ||
] | ||
}, | ||
"testing": { | ||
"text": [ | ||
"See the GitHub repo for detailed testing instructions." | ||
] | ||
}, | ||
"cleanup": { | ||
"text": [ | ||
"Delete the stack: <code>cdk delete</code>." | ||
] | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Grzegorz Kozub", | ||
"image": "https://drive.google.com/file/d/1eo1_Zx4gIgmQO1cupdfUJbkxjEpC7NYJ/view?usp=sharing", | ||
"bio": "Cloud Application Architect working at AWS Professional Services.", | ||
"linkedin": "kozubgrzegorz", | ||
"twitter": "kozubg" | ||
} | ||
], | ||
"patternArch": { | ||
"icon1": { | ||
"x": 20, | ||
"y": 50, | ||
"service": "apigw", | ||
"label": "API Gateway REST API" | ||
}, | ||
"icon2": { | ||
"x": 50, | ||
"y": 50, | ||
"service": "lambda", | ||
"label": "AWS Lambda" | ||
}, | ||
"icon3": { | ||
"x": 80, | ||
"y": 50, | ||
"service": "bedrock", | ||
"label": "Amazon Bedrock" | ||
}, | ||
"line1": { | ||
"from": "icon1", | ||
"to": "icon2" | ||
}, | ||
"line2": { | ||
"from": "icon2", | ||
"to": "icon3" | ||
} | ||
} | ||
} |