2

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.

2
  • Can you clarify? You want to run a script on some instance(s) based on a trigger from step function? Commented May 20, 2020 at 0:05
  • Hello, try to run a lambda with python and the os module there. Ref.: stackoverflow.com/a/4256153/7348119 Commented May 20, 2020 at 0:07

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your reply. I'll check it by your suggestion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.