Print and capture output simultaneously in AWS specs