diff --git a/packages/aws/src/clients/cloudformation.client.ts b/packages/aws/src/clients/cloudformation.client.ts index 7b553dae8..634582bb9 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.getMessage().matches("(.*)" + stackName + "(.*)does not exist(.*)")) { + if (e.message.matches("(.*)" + stackName + "(.*)does not exist(.*)")) { return undefined; } else { throw e;