From an architecture point of view, when an AWS Step Functions invoke a Lambda, does it go through API Gateway or does the invocation happen directly?
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
The AWS Step Functions service directly invokes Lambda functions – there is no need for the Step Function service to go via another AWS service to invoke a Lambda.
You can see the
lambda:InvokeFunction
IAM permission needed by the service, in the AWS Lambda IAM policy template within the Step Function docs. There is no permission required for the API gateway.You also wouldn’t have the option to specify the
InvocationType
if it went via the API Gateway.To add to the above answer, when you create an Amazon States Language document, you can reference the ARN of the Lambda function. That is how AWS Step Functions invoke an AWS Lambda function. For example: