async function confirmCloudWatchLogs(logGroupName, trigger, options = {}) {
  const startTime = Date.now()
  const timeout = options.timeout || 3 * 60 * 1000
  return trigger()
    .then(() => wait(1000))
    .then(() =>
      awsRequest(CloudWatchLogsService, 'filterLogEvents', { logGroupName }),
    )
    .then(({ events }) => {
      if (events.length) {
        if (options.checkIsComplete) {
          if (options.checkIsComplete(events)) return events
        } else {
          return events
        }
      }
      const duration = Date.now() - startTime
      if (duration > timeout) throw new Error('Log items not found')
      return confirmCloudWatchLogs(
        logGroupName,
        trigger,
        Object.assign({}, options, { timeout: timeout - duration }),
      )
    })
}
Cloudwatch logs when turned on, are usually take some time for being effective
This function allows to confirm that new setting (turned on cloudwatch logs)
is effective after stack deployment