Use UpdateSigningCertificate with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use UpdateSigningCertificate with a CLI

The following code examples show how to use UpdateSigningCertificate.

CLI
AWS CLI

To activate or deactivate a signing certificate for an IAM user

The following update-signing-certificate command deactivates the specified signing certificate for the IAM user named Bob.

aws iam update-signing-certificate \ --certificate-id TA7SMP42TDN5Z26OBPJE7EXAMPLE \ --status Inactive \ --user-name Bob

To get the ID for a signing certificate, use the list-signing-certificates command.

For more information, see Manage signing certificates in the Amazon EC2 User Guide.

PowerShell
Tools for PowerShell V4

Example 1: This example updates the certificate that is associated with the IAM user named Bob and whose certificate ID si Y3EK7RMEXAMPLESV33FCREXAMPLEMJLU to mark it as inactive.

Update-IAMSigningCertificate -CertificateId Y3EK7RMEXAMPLESV33FCREXAMPLEMJLU -UserName Bob -Status Inactive
Tools for PowerShell V5

Example 1: This example updates the certificate that is associated with the IAM user named Bob and whose certificate ID si Y3EK7RMEXAMPLESV33FCREXAMPLEMJLU to mark it as inactive.

Update-IAMSigningCertificate -CertificateId Y3EK7RMEXAMPLESV33FCREXAMPLEMJLU -UserName Bob -Status Inactive