diff --git a/lib/plugins/aws/deploy/lib/validateTemplate.js b/lib/plugins/aws/deploy/lib/validateTemplate.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/aws/deploy/lib/validateTemplate.js
+++ b/lib/plugins/aws/deploy/lib/validateTemplate.js
@@ -2,6 +2,7 @@
 
 const getCompiledTemplateS3Suffix = require('../../lib/naming').getCompiledTemplateS3Suffix;
 const getS3EndpointForRegion = require('../../utils/getS3EndpointForRegion');
+const ServerlessError = require('../../../../serverless-error');
 
 module.exports = {
   async validateTemplate() {
@@ -18,7 +19,7 @@ module.exports = {
       const errorMessage = ['The CloudFormation template is invalid:', ` ${error.message}`].join(
         ''
       );
-      throw new Error(errorMessage);
+      throw new ServerlessError(errorMessage, 'INVALID_AWS_CLOUDFORMATION_TEMPLATE');
     });
   },
 };
fix: Expose template errror with user error