Local scripts via amp-script[script] attribute are currently invalid pending SxG security review. In the meantime, we recommend using remote scripts via [src].
amp-script[script]
[src]
https://github.com/ampproject/amphtml/issues/24171#issuecomment-524379878
following
Most helpful comment
following