profile
viewpoint

Ask questionsMultiple ways to invoke Lambda function as a Step Functions task

<!-- short description of the feature you are proposing: -->

There are currently multiple ways to invoke a Lambda function through Step Functions tasks

InvokeFunction - initial offering by Step Functions to invoke a Lambda function. RunLambdaTask - latest mechanism to invoke a Lambda function. includes all the functionality as InvokeFunction but also enables the capability to pause a workflow until a task token is returned or fire and forget.

Both of these mechanisms are valid in the Amazon States Language

Proposed Solution

<!-- Please include prototype/workaround/sketch/reference implementation: -->

  • Mark the InvokeFunction task as as deprecated and guide users towards using the newer RunLambdaTask. This solution is less abrasive than simply removing the legacy mechanism as there are likely customers who will not want to be forced to migrate.

Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->

  • [x] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

aws/aws-cdk

Answer questions eikeon

@shivlaks, The RunLambdaTask does not appear to offer the sync running of a lambda that the InvokeFunction did. Has the initial offering by Step Function to (synchronously) invoke a Lambda function been deprecated? I've not seen any documentation suggesting that.

The use case I'm currently working on has a Lambda function that's meant to be run synchronously and modifying it to fit the service integration pattern (that doesn't support sync in the case of lambda) only complicates it. Is the intent to have RunLambdaTask also support sync?

useful!

Related questions

Issues compiling CDK projects ("TS2300: Duplicate identifier 'IteratorResult'")
cli: cdk deploy issue hot 3
Subnet selection returns more than one per AZ hot 2
cli: synth fails if cdk.out does not exist hot 2
Default policy are getting creating even when Managed policy were created in the Role hot 1
Python dependency libraries are set to latest hot 1
using json instead of a string as context in cdk.json hot 1
Attaching Managed Policy to Role failing hot 1
Access denied when adding an event notification to an existing s3 bucket hot 1
Unable to create CfnSpotFleet using Python hot 1
DBClusterParameterGroup not found: default.aurora5.6 hot 1
aws-ecs: Cannot deploy fargate services with ECR images hot 1
ecs_patterns.ApplicationLoadBalancedFargateService should allow specifying healthCheck path - aws-cdk hot 1
CodeCommitSourceAction tries to add a policy to an imported role hot 1
Using getAtt that returns a list within a string that is joined in the generated template throws an error hot 1
Github User Rank List