-
Notifications
You must be signed in to change notification settings - Fork 4k
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
❗ NOTICE: stepfunctions-tasks: BedrockInvokeModel outputPath no longer passes output to next state #31302
❗ NOTICE: stepfunctions-tasks: BedrockInvokeModel outputPath no longer passes output to next state #31302
Comments
Thanks for the report. We've confirmed this a regression. We'll take actions immediately. |
Update notice for aws/aws-cdk#31302
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
#31305) ### Issue # (if applicable) Closes #31302. ### Reason for this change PR#30298 introduced a breaking change in the stepfunctions-tasks which was encoding the input/output path from the `TaskStateBaseProps` to be used to input a S3 URI, which is not always the case and customer might be using the JSON string as it is. ### Description of changes To keep the functionality from the original ask of issue #29229 ,added another props to specify S3 URI as an input to the stepfunctions-tasks. Introduced a feature flag to keep the existing behaviour for the customers and not introduce a breaking change. ### Description of how you validated changes Updated integ test and deployed in account Integ Test Results: `aws stepfunctions start-execution --state-machine-arn <deployed state machine arn> `: should return execution arn A5-zEnXPmmPWTJx { "executionArn": "arn:aws:states:us-east-1:XXXX:execution:StateMachine2E01A3A5-zEnXPmmPWTJx:516f2e60-9507-46cb-95e6-4d9453429b08", "startDate": "2024-09-04T15:43:33.200000-07:00" } `aws stepfunctions describe-execution --execution-arn <exection-arn generated before> `: should return status as SUCCEEDED ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This issue has been fixed now in latest release (v2.156.0) under feature flag Please let us know if you are still facing the issue. |
aws#31305) ### Issue # (if applicable) Closes aws#31302. ### Reason for this change PR#30298 introduced a breaking change in the stepfunctions-tasks which was encoding the input/output path from the `TaskStateBaseProps` to be used to input a S3 URI, which is not always the case and customer might be using the JSON string as it is. ### Description of changes To keep the functionality from the original ask of issue aws#29229 ,added another props to specify S3 URI as an input to the stepfunctions-tasks. Introduced a feature flag to keep the existing behaviour for the customers and not introduce a breaking change. ### Description of how you validated changes Updated integ test and deployed in account Integ Test Results: `aws stepfunctions start-execution --state-machine-arn <deployed state machine arn> `: should return execution arn A5-zEnXPmmPWTJx { "executionArn": "arn:aws:states:us-east-1:XXXX:execution:StateMachine2E01A3A5-zEnXPmmPWTJx:516f2e60-9507-46cb-95e6-4d9453429b08", "startDate": "2024-09-04T15:43:33.200000-07:00" } `aws stepfunctions describe-execution --execution-arn <exection-arn generated before> `: should return status as SUCCEEDED ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
aws#31305) ### Issue # (if applicable) Closes aws#31302. ### Reason for this change PR#30298 introduced a breaking change in the stepfunctions-tasks which was encoding the input/output path from the `TaskStateBaseProps` to be used to input a S3 URI, which is not always the case and customer might be using the JSON string as it is. ### Description of changes To keep the functionality from the original ask of issue aws#29229 ,added another props to specify S3 URI as an input to the stepfunctions-tasks. Introduced a feature flag to keep the existing behaviour for the customers and not introduce a breaking change. ### Description of how you validated changes Updated integ test and deployed in account Integ Test Results: `aws stepfunctions start-execution --state-machine-arn <deployed state machine arn> `: should return execution arn A5-zEnXPmmPWTJx { "executionArn": "arn:aws:states:us-east-1:XXXX:execution:StateMachine2E01A3A5-zEnXPmmPWTJx:516f2e60-9507-46cb-95e6-4d9453429b08", "startDate": "2024-09-04T15:43:33.200000-07:00" } `aws stepfunctions describe-execution --execution-arn <exection-arn generated before> `: should return status as SUCCEEDED ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#31305) ### Issue # (if applicable) Closes #31302. ### Reason for this change PR#30298 introduced a breaking change in the stepfunctions-tasks which was encoding the input/output path from the `TaskStateBaseProps` to be used to input a S3 URI, which is not always the case and customer might be using the JSON string as it is. ### Description of changes To keep the functionality from the original ask of issue #29229 ,added another props to specify S3 URI as an input to the stepfunctions-tasks. Introduced a feature flag to keep the existing behaviour for the customers and not introduce a breaking change. ### Description of how you validated changes Updated integ test and deployed in account Integ Test Results: `aws stepfunctions start-execution --state-machine-arn <deployed state machine arn> `: should return execution arn A5-zEnXPmmPWTJx { "executionArn": "arn:aws:states:us-east-1:XXXX:execution:StateMachine2E01A3A5-zEnXPmmPWTJx:516f2e60-9507-46cb-95e6-4d9453429b08", "startDate": "2024-09-04T15:43:33.200000-07:00" } `aws stepfunctions describe-execution --execution-arn <exection-arn generated before> `: should return status as SUCCEEDED ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Please add your +1 👍 to let us know you have encountered this
Status: IN-PROGRESS
Overview:
Previously, the BedrockInvokeModel
outputPath
parameter could be used to select a portion of the model output to pass to the next state. This behavior aligns with how the parameter is documented "JSONPath expression to select select a portion of the state output to pass to the next state."https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.BedrockInvokeModel.html#outputpath
Now, the outputPath parameter is assumed to be an S3Uri where the model output should be saved. The parameter can no longer be used to select model output and pass it to the next state.
This behavior appears to have changed in f5dd73b
Complete Error Message:
Workaround:
Solution:
Revert existing code for encoding the path under S3Uri, and possibly introduce another variable in BedrockTaskProps instead of extending the existing
TaskStateBaseProps
.Related Issues:
Regression Issue
Last Known Working CDK Version
2.150.0
Expected Behavior
In a BedrockInvokeModel task, set outputPath:
The Step Functions workflow definition is synthesized as:
When I execute the deployed Step Functions state machine, the model text output is passed as the output of the task.
Current Behavior
The outputPath parameter is synthesized as:
When I execute the deployed Step Functions state machine, I get a validation exception:
Reproduction Steps
This is my stack:
https://github.com/aws-samples/amazon-bedrock-serverless-prompt-chaining/blob/main/techniques/stacks/model_invocation.py
Possible Solution
I suggest reverting the change above, so that outputPath works as documented and expected. The
input
andoutput
parameters were intended to distinguish between state that should be passed between states (inputPath/outputPath) vs destinations where input and output should be sourced from (input/output).Additional Information/Context
No response
CDK CLI Version
2.155.0
Framework Version
No response
Node.js Version
v20.17.0
OS
Linux
Language
Python
Language Version
Python 3.12.3
Other information
No response
The text was updated successfully, but these errors were encountered: