The most likely reason for this is that the custom AMI was created without using the EC2Config Service tab .
Windows CloudFormaion support depends on the functionality of EC2Config to run the commands specified in the user data on first boot. This function is automatically disabled after the first boot, so subsequent downloads do not lead to repeated runs of the same commands.
If you create a custom AMI using the EC2Config Bundle tab, it ensures that the AMI will enable the function to execute the User Data command. Therefore, it is necessary (and always recommended) to create a custom AMI using the EC2Config Bundle tab.
Hope this helps.
Regards, Shon
source share