Use aws iam role instead of access key and secret key

Can we use iam roles instead of access key and secret key. I am not finding that option.