class_docstr: S3Payload class
class_docstr_tok: ["S3Payload","class"]
docstr: Ensure the S3 file's size is not too large to download into the Lambda environment
  
  Returns:
      bool: True if the file is smaller than 128 MB, False otherwise
docstr_tok: ["Ensure","the","S3","file","'s","size","is","not","too","large","to","download","into","the","Lambda","environment","Returns",":","bool",":","True","if","the","file","is","smaller","than","128","MB",",","False","otherwise"]
code: def _check_size(self):
      """Ensure the S3 file's size is not too large to download into the Lambda environment
  
      Returns:
          bool: True if the file is smaller than 128 MB, False otherwise
      """
      # Ignore 0 size files
      if self.size == 0:
          LOGGER.warning(
              "S3 file size is 0 bytes, skipping: %s/%s",
              self.bucket,
              self.key,
          )
          return False
  
      # size greater than 128MB
      if self.size > self.MAX_S3_SIZE:
          raise S3PayloadError(
              "S3 object {}/{} is too large and cannot be downloaded "
              "from S3: {}".format(
                  self.bucket, self.key, self.display_size
              )
          )
  
      return True
  
imports: import json
  import logging
  import urllib.request
  import urllib.parse
  import urllib.error
  import gzip
  import os
  import tempfile
  import subprocess
  import time
  import boto3
  from botocore.exceptions import ClientError
  import jsonlines
  from streamalert.classifier.payload.payload_base import PayloadRecord, RegisterInput, StreamPayload
  from streamalert.shared import CLASSIFIER_FUNCTION_NAME
  from streamalert.shared.logger import get_logger
  from streamalert.shared.metrics import MetricLogger
label_desc: Use image node_id 8 for calling the S3Payload obj's underlying member method code with example usage: obj._check_size() and returns: True, False