Rename Windows before chef runs

Hi All

we are running Chef Cookbooks in AWS for windows.
When we launch Instances in AWS, Chef will register current system name which is there in the AWS AMI and starts required stuff.(domain join, etc)
When we launch another instance chef is failing because chef server is already registered with AMI name.

So, how do we maintain random system names while launching instances from AWS AMI?

Thanks

How I do it on prem, is I make what ever kicks off the template name the template a random name, ultimately thats what is naming the box.