Deploying it in production
In the sample page we created, the awsSecret key was used as is. This awsSecret key should not be exposed to the outside world. In this section, we will learn how to change it to server-side encryption so that you can implement the search on your ecommerce website.

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://amazon.commercedna.com/sign?awsId=****&&awsSecret=****&redirect=/search/js/client.js"></script>

Lets see how to replace awsSecret=**** above with the server side token.

Step 1
Make an API call from your server to generate token:
https://amazon.commercedna.com/sign?awsId=****&&awsSecret=****
You should get the token along with redirect URL:
{
"awsId": "****",
"token": "****",
"redirect": "https://amazon.commercedna.com/search/js/client.js?awsId=****&token=****"
}


Step 2
Now, use the redirect URL in the above response for your CommerceDNA script:
<script src="https://amazon.commercedna.com/search/js/client.js?awsId=****&token=****"></script>