aws-samples / bedrock-claude-chat

AWS-native chatbot using Bedrock + Claude (+Mistral)
MIT No Attribution
688 stars 232 forks source link

[BUG] Failed to Publish API for shared bot #352

Closed khchan123 closed 2 weeks ago

khchan123 commented 3 weeks ago

Describe the bug

Filling out this field will help us investigate the issue efficiently. Providing detailed information allows us to set the appropriate priority. We appreciate your cooperation.
When publishing api for a shared bot, then you will see error message saying the api is error to create.

To Reproduce

Filling out this field will help us investigate the issue efficiently. Providing detailed information allows us to set the appropriate priority. We appreciate your cooperation.
Steps to reproduce the behavior:

  1. Create a shared bot.
  2. Open 'Shared Bot Publish API Settings'
  3. Input the info and then click 'Create'
  4. See error

Screenshots

Code build failed with the following log:

[Container] 2024/06/07 15:11:39.310483 Running command cdk deploy --require-approval never ApiPublishmentStack$PUBLISHED_API_ID \
--
57 | -c publishedApiThrottleRateLimit=$PUBLISHED_API_THROTTLE_RATE_LIMIT \
58 | -c publishedApiThrottleBurstLimit=$PUBLISHED_API_THROTTLE_BURST_LIMIT \
59 | -c publishedApiQuotaLimit=$PUBLISHED_API_QUOTA_LIMIT \
60 | -c publishedApiQuotaPeriod=$PUBLISHED_API_QUOTA_PERIOD \
61 | -c publishedApiDeploymentStage=$PUBLISHED_API_DEPLOYMENT_STAGE \
62 | -c publishedApiId=$PUBLISHED_API_ID \
63 | -c publishedApiAllowedOrigins=$PUBLISHED_API_ALLOWED_ORIGINS
64 | /codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:859
65 | return new TSError(diagnosticText, diagnosticCodes, diagnostics);
66 | ^
67 | TSError: ⨯ Unable to compile TypeScript:
68 | bin/api-publish.ts(6,10): error TS2305: Module '"../lib/constructs/embedding"' has no exported member 'DbConfig'.
69 |  
70 | at createTSError (/codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:859:12)
71 | at reportTSError (/codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:863:19)
72 | at getOutput (/codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:1077:36)
73 | at Object.compile (/codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:1433:41)
74 | at Module.m._compile (/codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:1617:30)
75 | at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
76 | at Object.require.extensions.<computed> [as .ts] (/codebuild/output/src1410467459/src/cdk/node_modules/ts-node/src/index.ts:1621:12)
77 | at Module.load (node:internal/modules/cjs/loader:1197:32)
78 | at Function.Module._load (node:internal/modules/cjs/loader:1013:12)
79 | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
80 | diagnosticCodes: [ 2305 ]
81 | }
82 |  
83 | Subprocess exited with error 1
84 |  
85 | [Container] 2024/06/07 15:11:46.438935 Command did not exit successfully cdk deploy --require-approval never ApiPublishmentStack$PUBLISHED_API_ID \
86 | -c publishedApiThrottleRateLimit=$PUBLISHED_API_THROTTLE_RATE_LIMIT \
87 | -c publishedApiThrottleBurstLimit=$PUBLISHED_API_THROTTLE_BURST_LIMIT \
88 | -c publishedApiQuotaLimit=$PUBLISHED_API_QUOTA_LIMIT \
89 | -c publishedApiQuotaPeriod=$PUBLISHED_API_QUOTA_PERIOD \
90 | -c publishedApiDeploymentStage=$PUBLISHED_API_DEPLOYMENT_STAGE \
91 | -c publishedApiId=$PUBLISHED_API_ID \
92 | -c publishedApiAllowedOrigins=$PUBLISHED_API_ALLOWED_ORIGINS exit status 1
93 | [Container] 2024/06/07 15:11:46.443653 Phase complete: BUILD State: FAILED
94 | [Container] 2024/06/07 15:11:46.443671 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: cdk deploy --require-approval never ApiPublishmentStack$PUBLISHED_API_ID \
95 | -c publishedApiThrottleRateLimit=$PUBLISHED_API_THROTTLE_RATE_LIMIT \
96 | -c publishedApiThrottleBurstLimit=$PUBLISHED_API_THROTTLE_BURST_LIMIT \
97 | -c publishedApiQuotaLimit=$PUBLISHED_API_QUOTA_LIMIT \
98 | -c publishedApiQuotaPeriod=$PUBLISHED_API_QUOTA_PERIOD \
99 | -c publishedApiDeploymentStage=$PUBLISHED_API_DEPLOYMENT_STAGE \
100 | -c publishedApiId=$PUBLISHED_API_ID \
101 | -c publishedApiAllowedOrigins=$PUBLISHED_API_ALLOWED_ORIGINS. Reason: exit status 1
102 | [Container] 2024/06/07 15:11:46.475161 Entering phase POST_BUILD

Additional context

Add any other context about the problem here.