capabilities.work

Rotate Key Pair

A 3-step recipe with Amazon EC2. We can help you get access.

Recipe · 3 steps

Rotate Key Pair

Replace an existing SSH key pair with a freshly created one.

  1. Confirm the existing key pair is present before rotating.
  2. Create the replacement key pair.
  3. Delete the retired key pair now that its replacement exists.
What you'll need to have ready
  • oldKeyName: The name of the existing key pair to retire.
  • newKeyName: The name for the replacement key pair.
For your developer

Arazzo workflow amazon-ec2:rotate-key-pair, 3 operations: DescribeKeyPairs → CreateKeyPair → DeleteKeyPair. Specs on APIs.io.