Issue
I have a step function which defined with jobs definition in java.
I wanna add an async run bash script which trying to move the data from efs to s3 bucket. What I did: 1. Login the the ec2 instance which has efs data mounted; 2. run the data move bash script;
The disadvantage of it is I need daily manually run this script. So, I wanna know if there is a way to run this script from step function since all the efs data are generated from the job submitted to this step function.
Solution
You cannot directly however the following should work for you:
- Step to call a Lambda function
- Have Lambda run a Systems Manager Run Command
- Wait for run command to be completed successfully, before returning success or error.
Either write your own Run Command Document or instead take a look at AWS-RunShellScript
document.
Answered By - Chris Williams