1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
If you invoke your lambda function from SFN using the full function ARN in the Resource attribute, you will get back only what was returned from the Lambda function. Also, you do not want to json.dump the object that you return. Just return a map and that will be included in your output.
For instance, the following function:
def lambda_handler(event, context):
# TODO implement
body = {
'Test': 'abc',
'Value': 123
}
return body
When invoked like this:
"Hello": {
"Type": "Task",
"Resource": "arn:aws:lambda:eu-west-1:xxxxxxxxx:function:HelloWorld:$LATEST",
"ResultPath": "$.LambdaResult",
"Next": "World"
},
With the following input:
{
"Input": "My input"
}
returned the following:
{
"Input": "My input",
"LambdaResult": {
"Test": "abc",
"Value": 123
}
}
Contenuto pertinente
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 4 mesi fa
- AWS UFFICIALEAggiornata 2 anni fa