Skip to content

fix(stepfunctions-tasks): properly serialize CallAwsServiceCrossRegion Lambda responses #34843

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

Conversation

alvazjor
Copy link
Contributor

Issue # (if applicable)

Closes #34768

Reason for this change

The handler in cross-region-aws-sdk-handler/index.ts file was not incorrectly returning byte-array as the payload when the called service was AWS Lambda. More details in the issue itself.

Description of changes

The handler now checks the response to identify if it is a byte-array or other type of binary data and parses it correctly into a string, which is the expected format

Describe any new or updated permissions being added

NA

Description of how you validated changes

Integ test added and unit tests

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 June 27, 2025 17:21
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Jun 27, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 27, 2025
@ozelalisen ozelalisen self-assigned this Jun 30, 2025
@alvazjor alvazjor force-pushed the 34768-aws_stepfunction_tasks-callawsservicecrossregions-lambda-doesnt-return-service-response-correctly branch from b915613 to d2ee6e5 Compare June 30, 2025 12:56
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jun 30, 2025
@ozelalisen
Copy link
Member

Overall LGTM, but security guardian is failing, could you have a look on that?

@alvazjor
Copy link
Contributor Author

alvazjor commented Jul 1, 2025

@ozelalisen Security Guardian is complaining about a test that has a role with too broad permissions. The test itself was not modified, is an old test that gives too broad permissions which makes sec guardian to mark it. If we want, we can fix it as a follow up, is not related to the current fix.

Copy link
Contributor

mergify bot commented Jul 1, 2025

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).

…rossregions-lambda-doesnt-return-service-response-correctly
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 4042938
  • 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 1, 2025

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 a4b15df into main Jul 1, 2025
18 checks passed
@mergify mergify bot deleted the 34768-aws_stepfunction_tasks-callawsservicecrossregions-lambda-doesnt-return-service-response-correctly branch July 1, 2025 09:38
Copy link
Contributor

github-actions bot commented Jul 1, 2025

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2025
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/small Small work item – less than a day of effort p1 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_stepfunction_tasks: CallAwsServiceCrossRegion's Lambda doesn't return service response correctly
4 participants