Use the below command to rename an IAM user from AWS CLI where oldusername is the current user name and newusername is the value for the new user name .
aws iam update-user --user-name oldusername --new-user-name newusername
Use the below command to rename an IAM user from AWS CLI where oldusername is the current user name and newusername is the value for the new user name .
aws iam update-user --user-name oldusername --new-user-name newusername