-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New serverless pattern - EventBridge-Bedrock-S3-AOSS #2381
New serverless pattern - EventBridge-Bedrock-S3-AOSS #2381
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running into an error on deployment.
BedrockServiceRoleAccessPolicyStack and OpenSearchServerlessStack got deployed successfully.
BedrockKnowledgebaseStack is failing with the folliwing error
Resource handler returned message: "bedrock-rag-jcrob6 already exists (Service: S3, Status Code: 0, Request ID: null)" (RequestToken: f84ae2ac-9ac4-ad30-44c1-4a2c0a9bb599, HandlerErrorCode: AlreadyExists)
``` | ||
1. From the command line, use AWS CDK to deploy the AWS resources. | ||
``` | ||
cdk deploy --all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running into an error on deployment.
BedrockServiceRoleAccessPolicyStack and OpenSearchServerlessStack got deployed successfully.
BedrockKnowledgebaseStack is failing with the folliwing error
KBDataSourceS3Bucket
Resource handler returned message: "bedrock-rag-jcrob6 already exists (Service: S3, Status Code: 0, Request ID: null)" (RequestToken: f84ae2ac-9ac4-ad30-44c1-4a2c0a9bb599, HandlerErrorCode: AlreadyExists)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately ran into another error with the new changes with BedrockKBStack
Resource handler returned message: "Supplied Policy document is breaching Cloudwatch Logs policy length limit. (Service: CloudWatchLogs, Status Code: 400, Request ID: 39ff2d15-9eca-423f-bf0c-bf61d8d5bd4e)" (RequestToken: 972f5e1f-da40-7437-4d9b-5d6c5f5fea2e, HandlerErrorCode: AccessDenied)
8c78e40
to
b35c787
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately ran into another error with the new changes with BedrockKBStack
``` | ||
1. From the command line, use AWS CDK to deploy the AWS resources. | ||
``` | ||
cdk deploy --all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately ran into another error with the new changes with BedrockKBStack
Resource handler returned message: "Supplied Policy document is breaching Cloudwatch Logs policy length limit. (Service: CloudWatchLogs, Status Code: 400, Request ID: 39ff2d15-9eca-423f-bf0c-bf61d8d5bd4e)" (RequestToken: 972f5e1f-da40-7437-4d9b-5d6c5f5fea2e, HandlerErrorCode: AccessDenied)
This appears to be specific to a situation in the AWS account used for deploying the stack. Fixed by adding an explicitly policy that should solve the issue around limits. |
Issue #, if available: 2382
Description of changes:
Added a serverless pattern to automate syncing an S3 data source sources to knowledge base for Amazon Bedrock using EventBridge scheduler. An EventBridge schedule is configured to run at a regular rate (default of 5mins). The EventBridge uses the universal target to trigger the StartIngestionJob API on the Amazon Bedrock Agent service. The StartIngestionJob operation in turn would sync the data source so that it is re-indexed to the knowledge base. Syncing is incremental, so Amazon Bedrock only processes added, modified, or deleted documents since the last sync.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.