The CreateHandler is being called multiple times by the CloudFormation framework (documented for example here), so we have to make sure it's idempotent. To do that we ensure the same clientRequestToken is sent along with the register type call. The current bug is triggered because the random clientRequestTokens cause the hash of the RegisterTypeRequest to be different between CreateHandler invokation which causes CFN to resend the request (see hashing of the request here)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
The CreateHandler is being called multiple times by the CloudFormation framework (documented for example here), so we have to make sure it's idempotent. To do that we ensure the same clientRequestToken is sent along with the register type call. The current bug is triggered because the random clientRequestTokens cause the hash of the RegisterTypeRequest to be different between CreateHandler invokation which causes CFN to resend the request (see hashing of the request here)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.