Refactor the cookbook to ensure proper way of sending aws credentials