Hi,
I want to call my Chalice-based lambdas from Step Functions. Since Chalice groups up multiple functions into a single lambda, I can't call into a specific function using the ARN (which is what the Step Functions Amazon States Language wants).
The only workaround I can think of is writing a new set of lambdas, each of which calls the relevant HTTP endpoint. But obviously going lambda -> API Gateway -> lambda is inefficient...
Presumably Chalice is internally determining which function to call based on data passed from API Gateway - perhaps I could just "fake" that, so the Chalice function thinks the caller is API Gateway...
Am I missing a better way of doing this?
Many thanks,
Ned
If people are interested - I "faked" the data as mentioned above and got it to work (although its pretty hacky). This is what I sent from the Step Function:
{
"requestContext": {"resourcePath": "/MY_RESOURCE_PATH/{XYZ}",
"httpMethod": "POST"},
"pathParameters": {"XYZ": 1234},
"queryStringParameters": {},
"headers": {},
"body": {},
"stageVariables": {}
}
This should be doable now with the addition of pure lambda functions.
Most helpful comment
If people are interested - I "faked" the data as mentioned above and got it to work (although its pretty hacky). This is what I sent from the Step Function:
{
"requestContext": {"resourcePath": "/MY_RESOURCE_PATH/{XYZ}",
"httpMethod": "POST"},
"pathParameters": {"XYZ": 1234},
"queryStringParameters": {},
"headers": {},
"body": {},
"stageVariables": {}
}