Skip to content

Commit

Permalink
Create apigw-lambda-bedrock-java.json
Browse files Browse the repository at this point in the history
json file for publishing.
  • Loading branch information
ellisms authored Jan 4, 2024
1 parent f0c85c3 commit 93de3ce
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions apigw-lambda-bedrock-cdk-java/apigw-lambda-bedrock-java.json
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"
}
}
}

0 comments on commit 93de3ce

Please sign in to comment.