-
Notifications
You must be signed in to change notification settings - Fork 34
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
bedrock: Agent CR Lambda provider errors not surfaced #402
Labels
Comments
mccauleyp
added
bug
Something isn't working
needs-triage
This issue or PR still needs to be triaged.
labels
Apr 23, 2024
Hi @mccauleyp , thank you for reporting this issue ! I was able to reproduce and will update here when we have an update. |
We are working on removing custom resources to use the official L1 constructs for Bedrock, this should fix this issue |
Closing this as #414 was merged and removes custom resources for bedrock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
Errors in the Custom Resource Lambda provider function for Bedrock agents don't seem to get surfaced properly at the CDK console, I think because a
Future
is being embedded into the error message instead of the result of the future.For example, if I try to create an agent with a model that isn't yet one of the static members:
I see the following deployment error:
❌ Deployment failed: Error: The stack named ______ failed to deploy: UPDATE_ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: RetryError[<Future at 0x7f5b68612840 state=finished raised AWSRetryableError>]
Expected Behavior
If I go to the AWS console and look at the CR Lambda log, I can find the error I'm looking for:
It looks like the final error handling logic is embedding the
Future
object into the message instead of the result, and we should be seeing the informative messageFoundation model is null or not supported, try providing [anthropic.claude-v1, anthropic.claude-v2, anthropic.claude-instant-v1, anthropic.claude-v2:1, amazon.titan-text-premier-v1:0, anthropic.claude-3-sonnet-20240229-v1:0, anthropic.claude-3-haiku-20240307-v1:0]
at the CDK console instead.Current Behavior
Error cause is hidden,
Future
object is printed in message instead of error message.Reproduction Steps
Try deploying an Agent with an unsupported model, e.g.:
I also saw the same thing happen when the model instruction was too many characters.
Possible Solution
The error message is showing
RetryError[<Future at 0x7f5b68612840 state=finished raised AWSRetryableError>]
, so it seems like the result of theFuture
object needs to be put into the message instead of the object itself (e.g.future.result()
instead offuture
).Additional Information/Context
No response
CDK CLI Version
2.138.0
Framework Version
cdklabs.generative-ai-cdk-constructs==0.1.124
Node.js Version
v20.11.0
OS
OSX
Language
Python
Language Version
Python 3.11
Region experiencing the issue
us-east-1
Code modification
No
Other information
No response
Service quota
The text was updated successfully, but these errors were encountered: