def upload_server_cert(cert_name, cert_body, private_key, cert_chain=None, path=None, region=None, key=None, keyid=None, profile=None):
 exists = get_server_certificate(cert_name, region, key, keyid, profile)
 if exists:
  return True
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 try:
  info = conn.upload_server_cert(cert_name, cert_body, private_key, cert_chain)
  log.info('Created certificate {0}.'.format(cert_name))
  return info
 except boto.exception.BotoServerError as e:
  log.debug(e)
  msg = 'Failed to failed to create certificate {0}.'
  log.error(msg.format(cert_name))
  return False

def upload_server_cert ( cert_name , cert_body , private_key , cert_chain = None , path = None , region = None , key = None , keyid = None , profile = None ) : exists = get_server_certificate ( cert_name , region , key , keyid , profile ) if exists : return True conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) try : info = conn . upload_server_cert ( cert_name , cert_body , private_key , cert_chain ) log . info ( 'Created certificate {0}.' . format ( cert_name ) ) return info except boto . exception . BotoServerError as e : log . debug ( e ) msg = 'Failed to failed to create certificate {0}.' log . error ( msg . format ( cert_name ) ) return False
upload a certificate to amazon .