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

Support Resource: arn:aws:states:::lambda:invoke #209

Closed
andrhamm opened this issue Jun 4, 2019 · 2 comments · Fixed by #211
Closed

Support Resource: arn:aws:states:::lambda:invoke #209

andrhamm opened this issue Jun 4, 2019 · 2 comments · Fixed by #211
Labels

Comments

@andrhamm
Copy link
Contributor

andrhamm commented Jun 4, 2019

This is a Feature Proposal

Description

With the new Context Object it is possible to define a state with a resource of Resource: arn:aws:states:::lambda:invoke. This is similar to the callback pattern but without the .waitForTaskToken suffix. Specifying the function arn in the Parmeters.FunctionName in this way (as opposed to in Resource) allows you to then also modify the Parameters.Payload property, optionally referencing values from the context object using $$.

Example:

GetExecutionName:
  Type: Task
  Resource: arn:aws:states:::lambda:invoke
  Parameters:
    FunctionName: arn:aws:lambda:us-east-1:1234123412341234:function:my-service-dev-myFunction
    Payload:
      ExecutionName.$: "$$.Execution.Name"

It looks like this might be as simple as adding an additional case here like so:

case 'arn:aws:states:::lambda:invoke':
case 'arn:aws:states:::lambda:invoke.waitForTaskToken':
    return getLambdaPermissions(state);

Similar or dependent issues:

@theburningmonk
Copy link
Collaborator

@andrhamm thanks, that's a good shout

@theburningmonk
Copy link
Collaborator

🎉 This issue has been resolved in version 1.22.0 🎉

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 a pull request may close this issue.

2 participants