bedrock-claude-chat icon indicating copy to clipboard operation
bedrock-claude-chat copied to clipboard

[BUG] API publication is keep failing

Open hyunbinkor opened this issue 7 months ago β€’ 5 comments

🚨 Please Note 🚨

To ensure efficient investigation of the issue, please fill out the fields below with as much detail as possible. Reports that do not follow this template may be closed without notification. We appreciate your cooperation.

🐞Describe the bug

I'm stuck in step of API publication. It goes to in_progress step properly, but always failing.

πŸ”„ To Reproduce

Steps to reproduce the behavior:

  1. Go to 'My Bots' -> 'One of your bot'
  2. Click on 'Share'
  3. Go to 'Shared Bot Publish API Settings'
  4. Disable 'Throttling' & 'Quota'
  5. Set 'Allowed Origins' as 'http://' ,'', 'http://localhost:3000', 'http://example.com'

πŸ“· Screenshots

Image

πŸ”Ž Logs for API Genration

No export named BedrockClaudeChatBotTableName found. Rollback requested by user.

πŸ“ Additional context

I've tried for over 10 times, but keep ended in failing issue. And I suspect there is a problem with the regular expression validation process. (Because Allowed Origin of publication http response is kept empty.)

hyunbinkor avatar Apr 25 '25 07:04 hyunbinkor

I am also experiencing this issue and I also have no explanation as to why. The bot was deployed correctly

anjelinavelazquezz avatar Apr 25 '25 15:04 anjelinavelazquezz

@anjelinavelazquezz Is it deployed correctly? Where can I check endpoint and API key?

hyunbinkor avatar Apr 28 '25 00:04 hyunbinkor

After further investigation, I found that the root cause is related to the export/import mismatch between V2 and V3.

  • In BedrockChatStack (V3), the DynamoDB table name is exported as BedrockClaudeChatBotTableNameV3.
  • However, in the API publishing script (api-publish.ts), it still tries to import BedrockClaudeChatBotTableName, which causes a missing export error during the CloudFormation stack creation.

Proposed Solution

In the api-publish.ts, attempt to import BedrockClaudeChatBotTableNameV3 first, and fallback to BedrockClaudeChatBotTableName if not found.

Image

This ensures compatibility with both V2 and V3 deployments, and provides a smoother migration experience for users upgrading to V3.

I have also prepared a pull request to address this issue and will submit it shortly. πŸš€

hyunbinkor avatar Apr 28 '25 05:04 hyunbinkor

After adding the changes my team and I are able to now get and API Endpoint but we are having issues locating the conversationId and messageId after in DynamoDB after doing a Get Conversation and Get Message (as specified in the API specification See here. Do you have any info or suggestions about how to check where these get stored.

anjelinavelazquezz avatar Apr 29 '25 18:04 anjelinavelazquezz

@anjelinavelazquezz

I experienced a similar issue in v2, and it still seems to be happening. I'm not sure why, but it might be due to some kind of model compatibility issue.

Check out this issue #752

hyunbinkor avatar Apr 30 '25 00:04 hyunbinkor

I also noted that when I try to make a second API endpoint it fails, so I can only create one api endpoint per bot

anjelinavelazquezz avatar May 02 '25 18:05 anjelinavelazquezz

I also noted that when I try to make a second API endpoint it fails, so I can only create one api endpoint per bot.

That's by design. It's because the stack names conflict in CloudFormation.

statefb avatar May 08 '25 05:05 statefb

Can you give an input about our other concerns as to why after creating an API Endpoint but we are having issues locating the conversationId and messageId after in DynamoDB after doing a Get Conversation and Get Message (as specified in the API specification See here. Is this an active issue the repo has?

anjelinavelazquezz avatar May 08 '25 14:05 anjelinavelazquezz

It requires a few seconds or minutes to generate the response. During the generation the API returns 404. If still fail, checking the API logs can help to find the root cause.

statefb avatar May 13 '25 02:05 statefb

This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 14 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

github-actions[bot] avatar May 30 '25 01:05 github-actions[bot]