|
| 1 | +{ |
| 2 | + "title": "Invoke AI Agent with Amazon EventBridge Scheduler", |
| 3 | + "description": "Create a EventBridge scheduler which invokes an Amazon Bedrock Agent.", |
| 4 | + "language": "Python", |
| 5 | + "level": "300", |
| 6 | + "framework": "Terraform", |
| 7 | + "introBox": { |
| 8 | + "headline": "How it works", |
| 9 | + "text": [ |
| 10 | + "This pattern demonstrates how to invoke an Amazon Bedrock AI Agent on a recurring schedule using Amazon EventBridge Scheduler. An orchestrator AWS Lambda function, invoked by the scheduler, sends a task payload to the Amazon Bedrock Agent, which processes the input, generates an execution summary, and persists the result to an Amazon DynamoDB table. The pattern includes retry logic, a dead-letter queue for failed invocations, and least-privilege IAM policies scoped to the agent alias ARN." |
| 11 | + ] |
| 12 | + }, |
| 13 | + "gitHub": { |
| 14 | + "template": { |
| 15 | + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/eventbridge-scheduler-ai-agent-trigger", |
| 16 | + "templateURL": "serverless-patterns/eventbridge-scheduler-ai-agent-trigger", |
| 17 | + "projectFolder": "eventbridge-scheduler-ai-agent-trigger", |
| 18 | + "templateFile": "main.tf" |
| 19 | + } |
| 20 | + }, |
| 21 | + "resources": { |
| 22 | + "bullets": [ |
| 23 | + { |
| 24 | + "text": "Invoke a Lambda function on a schedule", |
| 25 | + "link": "https://docs.aws.amazon.com/lambda/latest/dg/with-eventbridge-scheduler.html" |
| 26 | + }, |
| 27 | + { |
| 28 | + "text": "Allow users to view information about and invoke an agent", |
| 29 | + "link": "https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples-agent.html#security_iam_id-based-policy-examples-perform-actions-agent" |
| 30 | + } |
| 31 | + ] |
| 32 | + }, |
| 33 | + "deploy": { |
| 34 | + "text": [ |
| 35 | + "terraform init", |
| 36 | + "terraform apply" |
| 37 | + ] |
| 38 | + }, |
| 39 | + "testing": { |
| 40 | + "text": [ |
| 41 | + "See the GitHub repo for detailed testing instructions." |
| 42 | + ] |
| 43 | + }, |
| 44 | + "cleanup": { |
| 45 | + "text": [ |
| 46 | + "terraform destroy", |
| 47 | + "terraform show" |
| 48 | + ] |
| 49 | + }, |
| 50 | + "authors": [ |
| 51 | + { |
| 52 | + "name": "Rajil Paloth", |
| 53 | + "image": "https://i.ibb.co/r2TsqGf6/Passport-size.jpg", |
| 54 | + "bio": "ProServe Delivery Consultant at AWS", |
| 55 | + "linkedin": "paloth" |
| 56 | + } |
| 57 | + ], |
| 58 | + "patternArch": { |
| 59 | + "icon1": { |
| 60 | + "x": 18, |
| 61 | + "y": 50, |
| 62 | + "service": "eventbridge-scheduler", |
| 63 | + "label": "Amazon EventBridge Scheduler" |
| 64 | + }, |
| 65 | + "icon2": { |
| 66 | + "x": 45, |
| 67 | + "y": 25, |
| 68 | + "service": "lambda", |
| 69 | + "label": "AWS Lambda" |
| 70 | + }, |
| 71 | + "icon3": { |
| 72 | + "x": 55, |
| 73 | + "y": 75, |
| 74 | + "service": "sqs", |
| 75 | + "label": "Amazon SQS DLQ" |
| 76 | + }, |
| 77 | + "icon4": { |
| 78 | + "x": 65, |
| 79 | + "y": 25, |
| 80 | + "service": "bedrock", |
| 81 | + "label": "Amazon Bedrock" |
| 82 | + }, |
| 83 | + "icon5": { |
| 84 | + "x": 87, |
| 85 | + "y": 25, |
| 86 | + "service": "dynamodb", |
| 87 | + "label": "Amazon DynamoDB" |
| 88 | + }, |
| 89 | + "line1": { |
| 90 | + "from": "icon1", |
| 91 | + "to": "icon2" |
| 92 | + }, |
| 93 | + "line2": { |
| 94 | + "from": "icon1", |
| 95 | + "to": "icon3" |
| 96 | + }, |
| 97 | + "line3": { |
| 98 | + "from": "icon2", |
| 99 | + "to": "icon4" |
| 100 | + }, |
| 101 | + "line4": { |
| 102 | + "from": "icon4", |
| 103 | + "to": "icon5" |
| 104 | + } |
| 105 | + } |
| 106 | +} |
0 commit comments