EC2 User-data script is not starting my Java application

I need to start my java application with a script,
but User Data are not working: if I start the application manually, it works.

My EC2 instance has Ubuntu

Here’s the snippet of the User Data I’m using:

cd /home/ubuntu
sudo su
java -jar HelpDesk-0.0.1-SNAPSHOT.jar

>Solution :

User Data script are executed only on the very first boot: it seems you expect that the script will be executed at every reboot.

Leave a Reply