Skip to content

fix: support arguments for EventBridge when query language is JSONata #654

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

Merged

Conversation

emirodriguez
Copy link
Contributor

@emirodriguez emirodriguez commented Jun 26, 2025

When using JSONata as the query language, AWS creates the step definition with Arguments instead of Parameters.

Example:

Step name:
  Type: Task
  Resource: arn:aws:states:::events:putEvents
- Parameters:
+ Arguments:
    Entries:
      - Source: 'my.source'
        DetailType: 'My Event'
        EventBusName: 'custom-bus'

That leads to the error below

✖ TypeError: Cannot read properties of undefined (reading 'Entries')
    at getEventBridgePermissions (/builds/project_name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:599:40)
    at /builds/project_name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:800:16
    at arrayMap (/builds/project_name/node_modules/lodash/lodash.js:653:23)
    at map (/builds/project_name/node_modules/lodash/lodash.js:9622:14)
    at Function.flatMap (/builds/project_name/node_modules/lodash/lodash.js:9325:26)
    at ServerlessStepFunctions.getIamPermissions (/builds/project_name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:716:12)
    at /builds/project_name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:875:56
    at Array.forEach (<anonymous>)
    at ServerlessStepFunctions.compileIamRole (/builds/project_name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:863:32)
    at ServerlessStepFunctions.tryCatcher (/builds/project_name/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/builds/project_name/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/builds/project_name/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/builds/project_name/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/builds/project_name/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/builds/project_name/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/builds/project_name/node_modules/bluebird/js/release/async.js:102:5)

Serverless Framework Version: 4.15.1
Serverless Step Function Version: ^3.23.0
Operating System: Windows with WSL

@zirkelc zirkelc merged commit 81cdfb4 into serverless-operations:master Jun 27, 2025
1 check passed
@zirkelc
Copy link
Collaborator

zirkelc commented Jun 27, 2025

Thanks you! 👍

@zirkelc
Copy link
Collaborator

zirkelc commented Jun 27, 2025

🎉 This PR is included in version 3.23.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants