diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js index 2cbbfe924..ba663fb96 100644 --- a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js +++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js @@ -29,7 +29,7 @@ const DEFAULT_STATUS_CODES = { pattern: '[\\s\\S]*\\[502\\][\\s\\S]*', }, 504: { - pattern: '[\\s\\S]*\\[504\\][\\s\\S]*', + pattern: '([\s\S]*\[504\][\s\S]*)|(^[Task timed out].*)', }, };