Amazon global grocery stores leader is leaving the tech giant as it continues its quest to figure out the key retail segment.