Using AWS Cloudformation, my aws cloudformation create-stack
fails for some yet-unclear reason. For this question the error and the explanation aren't relevant, but I think I'm passing a parameter with --parameters
that's not correctly handled within the CloudFormation template, or there might be an error in evaluating expressions or referencing variables in the template.
Anyway, I really would like to be able to output some debug statements or expressions during evaluation of the template; the provisioning of the stack. What's the CloudFormation equivalent of logging.debug(some-expression)
that gets the expression output to CloudWatch Logs or some other output channel?
The Events log in the CloudFormation Stacks shows the error (in my case), but unfortunately not the details that I need to fix the bug. It doesn't show the value of variables or CloudFormation expressions during execution / provisioning, and (by my knowledge) I can't create events that'll show the values of variables or expressions. CloudWatch Logs is empty, with respect to provisioning tasks. And aws cloudformation validate-template
reveals no errors, so the CloudFormation template is syntactically correct.