Add aws status on prompt and extract code to small pieces