- Le plus récent
- Le plus de votes
- La plupart des commentaires
You are looking to manage Input and Output Processing in Step Functions, which uses the InputPath, ResultPath, and OutputPath to manipulate the JSON state payload through the state machine. There are examples here: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-example.html
Your desired output above has keys in an array, which won't work, but you can change StepResult to an object. You would just need to format the Lambda results payload contents, and then use something like resultPath: '$.StepResult.Step1'
Your Lambda steps would be defined in the TypeScript something like this:
const stepOne = new tasks.LambdaInvoke(this, 'Step One', {
lambdaFunction: getStatusLambda,
outputPath: '$.Payload',
resultPath: '$.StepResult.Step1'
});
and your Activity might look something like this:
const submitJobActivity = new sfn.Activity(this, 'StepTwo');
new tasks.StepFunctionsInvokeActivity(this, 'Step Two', {
activity: submitJobActivity,
outputPath: '$.Payload',
resultPath: '$.StepResult.Step2'
});
Note this will preserve the rest of the state payload (JSON) so not exactly the output you describe as the input payload would be merged with the outputs.
Contenus pertinents
- demandé il y a un an
- demandé il y a 3 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans