0

I am trying to run a simple command to test a ShellCommandActivity with Data Pipeline from AWS.

>>> /usr/bin/python /home/ubuntu/script.py

That script should create a file on a S3, I know I could create a S3 file using the same Data Pipeline, but I want to test how to execute the script.

When I execute the pipeline I get this error:

/usr/bin/python: can't open file '/home/ubuntu/script.py': [Errno 2] No such file or directory

This is because AWS DP create a complete new EC2 instance when it runs, and my script.py is not there.

I created a Resource EC2 enter image description here

But there is not a field to define my own EC2 instance. How can I do this? Or maybe there some other way to approach this.

Thanks.

Gocht
  • 9,924
  • 3
  • 42
  • 81

2 Answers2

0

One workaround is directly execute script.py like

"command": "script.py"

Be sure your script.py with header

#!/usr/bin/env python
Min Zhou
  • 118
  • 5
-1

The script has to be placed on S3 and provide the path (//S3:....) in the script uri of the ShellCommandActivity

Colin R. Turner
  • 1,323
  • 15
  • 24