class_docstr: Build the deployment package for StreamAlert Lambdas
class_docstr_tok: ["Build","the","deployment","package","for","StreamAlert","Lambdas"]
docstr: Create a Lambda deployment package .zip file.
docstr_tok: ["Create","a","Lambda","deployment","package",".zip","file","."]
code: def create(self):
      """Create a Lambda deployment package .zip file."""
      LOGGER.info("Creating package for %s", self.PACKAGE_NAME)
  
      if os.path.exists(self.temp_package_path):
          shutil.rmtree(self.temp_package_path)
  
      # Copy the default package directory
      self._copy_directory(self.PACKAGE_NAME)
  
      # Copy the user-specified config directory
      # Ensure this is copied to the 'conf' destination directory
      self._copy_directory(self.config.config_path, destination="conf")
  
      # Copy in any user-specified files
      self._copy_user_config_files()
  
      if not self._resolve_libraries():
          LOGGER.error("Failed to install necessary libraries")
          return False
  
      # Zip it all up
      # Build these in the top-level of the terraform directory as streamalert.zip
      result = shutil.make_archive(
          os.path.join(self.config.build_directory, self.PACKAGE_NAME),
          "zip",
          self.temp_package_path,
      )
  
      LOGGER.info("Successfully created package: %s", result)
  
      # Remove temp files
      shutil.rmtree(self.temp_package_path)
  
      return result
  
file_path: streamalert/streamalert_cli/manage_lambda/package.py
imports: import os
  import shutil
  import tempfile
  from streamalert.shared.logger import get_logger
  from streamalert_cli.helpers import run_command
label_desc: Use image node_id 3 for calling the LambdaPackage obj's underlying member method code with example usage: obj.create() and returns: result, False