copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

[Bug]: Copilot env deploy shows null error instead of actual CloudFormation error message

Open fuzzbuzzz opened this issue 1 year ago • 1 comments

Description: When deploying an environment addon using copilot env deploy, CloudFormation errors are not properly surfaced to the user. Instead of showing the actual error message, Copilot displays a generic "null" error message.

Steps to Reproduce:

  1. Create a Copilot application with an environment
  2. Add an addon template (CloudFormation) with a deliberate error (e.g., invalid RDS engine version)
  3. Run copilot env deploy

Actual Result: Error message displayed: "Embedded stack arn:aws:cloudformation:[region]:[account]:stack/[stack-name] was not successfully created: null"

Expected Result: The actual CloudFormation error message should be displayed, such as: "Resource handler returned message: Cannot find version 14.7 for postgres (Service: Rds, Status Code: 400)"

Additional Information:

  • The actual error message is visible when deploying the same template directly through CloudFormation
  • This makes debugging deployment issues much more difficult as users need to check CloudFormation console or deploy separately to see the actual error
  • Copilot version: v1.34.0
  • AWS Region: eu-west-1
  • Operating System: macOS

Workaround: Currently users need to either:

  • Check CloudFormation console directly for the actual error message
  • Deploy the template directly using AWS CloudFormation to see the error

Suggested Fix: Modify Copilot to properly capture and display the underlying CloudFormation error messages instead of showing "null".

fuzzbuzzz avatar Nov 03 '24 00:11 fuzzbuzzz

image

Please find a screenshot from the CloudFormation events tab for reference. Thank you

fuzzbuzzz avatar Nov 03 '24 01:11 fuzzbuzzz