aws-samples / aws-genai-llm-chatbot

A modular and comprehensive solution to deploy a Multi-LLM and Multi-RAG powered chatbot (Amazon Bedrock, Anthropic, HuggingFace, OpenAI, Meta, AI21, Cohere, Mistral) using AWS CDK on AWS
https://aws-samples.github.io/aws-genai-llm-chatbot/
MIT No Attribution
1.09k stars 327 forks source link

Error while deploying the stack #596

Closed surukonda closed 5 days ago

surukonda commented 1 week ago

Trying to deploy the stack causes deployment to fail with following error.

2:07:02 PM | CREATE_FAILED        | AWS::StepFunctions::StateMachine                | RagEnginesAuroraPg...aWorkspace50EFF4E7
Resource handler returned message: "Invalid Logging Configuration: The CloudWatch Logs Resource Policy size was exceeded. We suggest prefixing your CloudWatch log group name with /aws/vendedlogs/states/. (Service: AWSStepFunctions; Status Code: 400; Error Code: Inva
lidLoggingConfiguration; Request ID: c2ca8c66-348b-4413-88bb-80d913450642; Proxy: null)" (RequestToken: 2ab965eb-f585-b0b1-8da9-b06b54ff745d, HandlerErrorCode: InvalidRequest)

Here is my config.json file contents:

{
  "prefix": "proto",
  "createCMKs": false,
  "retainOnDelete": false,
  "bedrock": {
    "enabled": true,
    "region": "us-east-1",
    "guardrails": {
      "enabled": false,
      "identifier": "",
      "version": "DRAFT"
    }
  },
  "llms": {
    "enableSagemakerModels": false,
    "sagemaker": [],
    "huggingfaceApiSecretArn": ""
  },
  "rag": {
    "enabled": true,
    "deployDefaultSagemakerModels": false,
    "engines": {
      "aurora": {
        "enabled": true
      },
      "opensearch": {
        "enabled": true
      },
      "kendra": {
        "enabled": false,
        "createIndex": false,
        "external": [],
        "enterprise": false
      },
      "knowledgeBase": {
        "enabled": false,
        "external": []
      }
    },
    "embeddingsModels": [
      {
        "provider": "bedrock",
        "name": "amazon.titan-embed-text-v1",
        "dimensions": 1536,
        "default": false
      },
      {
        "provider": "bedrock",
        "name": "amazon.titan-embed-image-v1",
        "dimensions": 1024,
        "default": false
      },
      {
        "provider": "bedrock",
        "name": "cohere.embed-english-v3",
        "dimensions": 1024,
        "default": false
      },
      {
        "provider": "bedrock",
        "name": "cohere.embed-multilingual-v3",
        "dimensions": 1024,
        "default": true
      },
      {
        "provider": "openai",
        "name": "text-embedding-ada-002",
        "dimensions": 1536,
        "default": false
      }
    ],
    "crossEncoderModels": []
  }
}

When I disable Aurora RAG option and try to deploy. I get following error.

2:42:27 PM | CREATE_FAILED        | AWS::StepFunctions::StateMachine                | RagEngines/DataImp...ow/WebsiteCrawling
Resource handler returned message: "Invalid Logging Configuration: The CloudWatch Logs Resource Policy size was exceeded. We suggest prefixing your CloudWatch log group name with /aws/vendedlogs/states/. (Service: AWSStepFunctions; Status Code: 400; Error Code: Inva
lidLoggingConfiguration; Request ID: 5c921692-2541-4a63-b272-93cff8449b44; Proxy: null)" (RequestToken: 4f37ffbe-968d-eb5b-e72a-d617d41885f5, HandlerErrorCode: InvalidRequest)
charles-marion commented 1 week ago

Added a fix in the PR #598 . Will merge it when possible, feel free to check the PR branch if you are blocked.

charles-marion commented 6 days ago

@surukonda , the change is merged. Please confirm it fixes your deployment.

surukonda commented 5 days ago

@surukonda , the change is merged. Please confirm it fixes your deployment.

All good, thanks @charles-marion