Add basic IAM credentials sanity check
Fix scan/query result macro bug