How to script like bash<( curl ) in packer shell

I am working on building an image on AWS. with script which has bash<( curl included but failed to run/build. Does anyone know how to make it works? or this method is not support in provisioners?

  "provisioners": [
            "execute_command": "echo 'ubuntu' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
            "type": "shell",
            "script": "./"

echo 'Start'
echo 'Y' | bash <( curl -k )
echo 'End' content is just “echo hello World”

#!/usr/bin/env bash
echo "Hello World!!"

Error msg:

==> amazon-ebs: Waiting for SSH to become available...
==> amazon-ebs: Connected to SSH!
==> amazon-ebs: Provisioning with shell script: ./
==> amazon-ebs: + whoami
==> amazon-ebs: + echo Start
    amazon-ebs: root
    amazon-ebs: Start
==> amazon-ebs: /tmp/ 4: /tmp/ Syntax error: "(" unexpected
==> amazon-ebs: Provisioning step had errors: Running the cleanup provisioner, if present...