AWS Lex chat bot website integration

Job ID: 34030253

Budget: £18 – £36 GBP

I have already created the chatbot and want advice on how to integrate it as a widget on an external website. All the development is done and I couldn't wrapped my head around the frontend part, which is not my expertise. I have tried using cloudformation but the JS snippet given doesn't seem to work when pasted on my website.
Related categories: JavaScript Amazon Web Services Chatbot