Create access keys in the IAM users -> security credentials -> create access keys -> CLI -> add tag. Download access key and secret access key. In CLI, type aws configure and add necessary details.