Amazon is contacting some former employees about returning for AI, machine learning and cloud roles, as the company competes for specialised talent after large-scale layoffs.