AWS EC2 User Data doesn't work after modifying it

Viewed 3986

Note: There are no asked questions about modifying EC2 instance user data.

my case: I added the user data below at EC2 first launch, and it worked perfectly.

#! /bin/bash
cd ~
echo "Test" > index.html
python -m SimpleHTTPServer 80

After launching the instance, in order to modify the user data I stopped the instance, changed the user data, and restarted the instance. But this time the scripts are not working.

#! /bin/bash
cd ~
echo "Test2" > index.html
python -m SimpleHTTPServer 80

I don't understand why the modified user data didn't work.

3 Answers
Related