It’s really simple to execute a batch file in Windows by just invoking the script in PowerShell or by double-clicking. Similarly, you must specify the shell script in order to invoke it in EC2 instances (Linux/Ubuntu, etc.). However, you’ll need to do a fast “chmod” action in order to execute a script. Otherwise, Ubuntu throws a permission denied error when you try to run a shell script.
[root@ip-xx-x-x-xxx ~]$ ./backupscript.sh
bash: ./backupscript.sh: permission denied
[root@ip-xx-x-x-xxx ~]$ chmod -R 777
[root@ip-xx-x-x-xxx ~]$ ./backupscript.sh
Hope you find this information useful.