diff --git a/apigw-lambda-bedrock-cdk-java/apigw-lambda-bedrock-java.json b/apigw-lambda-bedrock-cdk-java/apigw-lambda-bedrock-java.json new file mode 100644 index 000000000..ec7655c6b --- /dev/null +++ b/apigw-lambda-bedrock-cdk-java/apigw-lambda-bedrock-java.json @@ -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: cdk delete." + ] + }, + "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" + } + } +}