Skip to content
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

feat(stepfunctions-tasks): allow BedrockInvokeModel to use JsonPath #30298

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

shikha372
Copy link
Contributor

@shikha372 shikha372 commented May 22, 2024

Issue # (if applicable)

Closes #29229.

Reason for this change

When trying to use JsonPath to specify the S3 URIs that BedrockInvokeModel will read from and write from, you get an error.

Example of the Error message:

jsii.errors.JavaScriptError: Error: Field references must be the entire string, cannot concatenate them (found 's3://${Token[prompt_bucket.348]}/${Token[prompt_key.349]}')

Description of changes

Extended the inputPath property to be allowed as an input value for the task state.
Instead of adding a new S3Uri props in current BedrockInvokeModelProps as proposed in the original issue, leveraged the inputPath property that is already defined in sfn.TaskStateBaseProps and being extended by BedrockInvokeModelInputProps and BedrockInvokeModelOutputProps

Limitation: We cannot limit the resource policy to specific input token for which the value might be coming from the prompt, so had to keep it as [*] here.

Description of how you validated changes

Added unit tests.
Successful deployment of integration tests in the account.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team May 22, 2024 00:32
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p1 labels May 22, 2024
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 22, 2024
@shikha372 shikha372 marked this pull request as ready for review May 22, 2024 17:54
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 22, 2024
@aaythapa aaythapa self-assigned this May 22, 2024
This was referenced May 27, 2024
Copy link
Contributor

mergify bot commented Jun 17, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jun 17, 2024
Copy link
Contributor

mergify bot commented Jul 23, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@shikha372
Copy link
Contributor Author

@Mergifyio update

Copy link
Contributor

mergify bot commented Jul 23, 2024

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/close-stale-prs.yml without workflows permission

@shikha372
Copy link
Contributor Author

updating manually since mergifyio update is failing

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 4ad670a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Jul 24, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit f5dd73b into aws:main Jul 24, 2024
9 checks passed
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws aws locked as resolved and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(stepfunctions-tasks): BedrockInvokeModel cannot use JsonPath to specify input/output S3 URIs
3 participants