def is_valid_image_name(image_name):
 regex = re.compile('[\\w\\(\\)\\.\\-\\/_]{3,128}$')
 try:
  return (regex.match(image_name) is not None)
 except TypeError:
  return False

def is_valid_image_name ( image_name ) : regex = re . compile ( '[\\w\\(\\)\\.\\-\\/_]{3,128}$' ) try : return ( regex . match ( image_name ) is not None ) except TypeError : return False
check if image_name is a valid aws image name 1 .