async function detectDriftAndGetDetectionId()

in src/detect-drift.lambda.ts [70:77]


async function detectDriftAndGetDetectionId(stack: Stack): Promise<string> {
  console.log(`Calling detectStackDrift for ${stack.StackName}`);
  const response = await cloudformation.detectStackDrift({
    StackName: stack.StackName,
  }).promise();

  return response.StackDriftDetectionId;
}