When an error is returned by the lambda wrapped by aws cfn wrapper; the PhysicalResourceID is not included. It was modified recently to include all request types: https://github.com/aws/aws-lambda-go/pull/76
However, AWS Docs mention PhysicalResourceID is always required. Therefore Cloudformation incorrectly reports the error "Invalid Physical Resource ID" instead of the actual error during resource creation.
Steps to replicate:
Modified the Simple Test Lambda to include an error condition:
When an error is returned by the lambda wrapped by aws cfn wrapper; the PhysicalResourceID is not included. It was modified recently to include all request types: https://github.com/aws/aws-lambda-go/pull/76
However, AWS Docs mention PhysicalResourceID is always required. Therefore Cloudformation incorrectly reports the error "Invalid Physical Resource ID" instead of the actual error during resource creation.
Steps to replicate: Modified the Simple Test Lambda to include an error condition:
Created simple Cloudformation template to create custom resource:
Observed that the error reported during Stack Creation is incorrect:
The error message reported must be :
My Custom Resource Creation Failed