1

I'm using a cloudformation template to spin up a EC2 instance to execute a shell script.

For the EC2 resource, I've specified the terminateAfter value as 3 Hours.

Similarly, for the ShellCommandActivity I've specified the attemptTimeout value as 3 Hours.

The data pipeline still has the status 'timedout' after about an hour.

Now, the shell script runs a python file that takes about 1.5 hours to complete. I've been looking around, and it seems the default timeout for shell commands is about an hour. But that seems to be in the context of ssm service for AWS-RunShellScript.



aws ssm send-command --document-name "AWS-RunShellScript" --document-version "\$DEFAULT" --targets "Key=instanceids,Values=i-0880f01f9ffa133bf" --parameters '{"workingDirectory":,"executionTimeout":,"commands":}' --comment "Run a shell script or specify the commands to run." --timeout-seconds 600 --max-concurrency "50" --max-errors "0" --region us-east-1

The command the cloudformation script executes is:

bash -x ${INPUT1_STAGING_DIR}/filename.sh $1

Should I simply add the executiontimeout as a parameter to this command?

bash -x ${INPUT1_STAGING_DIR}/filename.sh $1 --executionTimeout "9999"

I'm quite lost, here. Any help would be greatly appreciated!

user795028
  • 93
  • 9

0 Answers0