AMP on AEM with JS API



Hello i want to ask about best practice to combine AEM with js API with AMP,


for example:

<amp-carousel width="2000" height="500" layout="responsive" type="slides" autoplay delay="2000" role="region" aria-label="Carousel with autoplay""banner.js">
<amp-img src="${data.image}" width="2000" height="300" alt="a sample image" layout="responsive"></amp-img>


or put it on

AMP code ...


but i got error, can someone guide me for best practice on this? its doesnt matter if u guys can solve this with Java API, i appreciate any help in this matter.

thanks in advanced.