diff --git a/packages/aws/src/clients/cloudformation.client.ts b/packages/aws/src/clients/cloudformation.client.ts index 0dbb530a6..5e8f23a80 100644 --- a/packages/aws/src/clients/cloudformation.client.ts +++ b/packages/aws/src/clients/cloudformation.client.ts @@ -76,7 +76,7 @@ export class CloudformationClient implements CloudformationClientInterface { return response.Stacks[0]; } catch (e) { this.logHandler.error("Error getting stack description from cloudformation", {error: e}, AwsModuleKeyname); - if (e.stack.matches("(.*)" + stackName + "(.*)does not exist(.*)")) { + if (e.message.match("(.*)" + stackName + "(.*)does not exist(.*)")) { return undefined; } else { throw e;