code: def get_cert_and_update_domain(
                                  zappa_instance,
                                  lambda_name,
                                  api_stage,
                                  domain=None,
                                  manual=False,
                              ):
      
  
      try:
          create_domain_key()
          create_domain_csr(domain)
          get_cert(zappa_instance)
          create_chained_certificate()
  
          with open('{}/signed.crt'.format(gettempdir())) as f:
              certificate_body = f.read()
  
          with open('{}/domain.key'.format(gettempdir())) as f:
              certificate_private_key = f.read()
  
          with open('{}/intermediate.pem'.format(gettempdir())) as f:
              certificate_chain = f.read()
  
          if not manual:
              if domain:
                  if not zappa_instance.get_domain_name(domain):
                      zappa_instance.create_domain_name(
                          domain_name=domain,
                          certificate_name=domain + "-Zappa-LE-Cert",
                          certificate_body=certificate_body,
                          certificate_private_key=certificate_private_key,
                          certificate_chain=certificate_chain,
                          certificate_arn=None,
                          lambda_name=lambda_name,
                          stage=api_stage
                      )
                      print("Created a new domain name. Please note that it can take up to 40 minutes for this domain to be created and propagated through AWS, but it requires no further work on your part.")
                  else:
                      zappa_instance.update_domain_name(
                          domain_name=domain,
                          certificate_name=domain + "-Zappa-LE-Cert",
                          certificate_body=certificate_body,
                          certificate_private_key=certificate_private_key,
                          certificate_chain=certificate_chain,
                          certificate_arn=None,
                          lambda_name=lambda_name,
                          stage=api_stage
                      )
          else:
              print("Cerificate body:\n")
              print(certificate_body)
  
              print("\nCerificate private key:\n")
              print(certificate_private_key)
  
              print("\nCerificate chain:\n")
              print(certificate_chain)
  
      except Exception as e:
          print(e)
          return False
  
      return True
docs: Main cert installer path.