aws iam delete-access-key
Deletes the access key pair associated with the specified IAM user. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To delete an access key for an IAM user
The following delete-access-key example deletes the specified access key (access key ID and secret access key) for the IAM user named Bob.
aws iam delete-access-key --access-key-id AKIDPMS9RO4H3FEXAMPLE --user-name BobIdentify--access-key-idThe access key ID for the access key ID and secret access key you want to delete.--user-nameThe name of the user whose access key pair you want to delete.This command produces no output.
To list the access keys defined for an IAM user, use the list-access-keys command.
For more information, see Managing access keys for IAM users in the AWS IAM User Guide.
Options
--access-key-idThe access key ID for the access key ID and secret access key you want to delete.--user-nameThe name of the user whose access key pair you want to delete.