1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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
}
}
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr