I know to run a remote script, we can use
curl -s <remote-script-url> | python
or wget -O - <remote-script-url> | bash
But, instead of specifying the interpreter explicitly, can we run the script using shebang.
My use case is, the scripts will be from trusted sources - may be python or bash and I run it from EC2 User data. If the above is not possible, is it a way to achieve the same using cloud-config (script will be in s3)
Thanks in advance