I have an ec2 instance"abc1"(ubuntu) and I create image from abc1.
Then,I launch a new instance "abc2" from abc1 image.
I want abc2 to run the script when it will be launched.
So,I write the text in userdata:
#!/bin/bash
cd ~/env/xxx/bin/
source activate
python3.6 ~/env/xxx/source/test.py
I manually use these commands,it's valid.However,it doesn't work when using userdata automatically. Does anyone know how to adjust my settings? Thanks a lot.