This documentation is for the most recent version of Anthos clusters on AWS, released on November 3rd. See the Release notes for more information. For documentation on the previous generation of Anthos clusters on AWS, see Previous generation.

Create an EC2 key pair

Stay organized with collections Save and categorize content based on your preferences.

You can associate a specific SSH key pair with control plane or node pool instances during creation.

To generate an asymmetric private key and import its public key into AWS, run the following commands:

ssh-keygen -t rsa -m PEM -b 4096 -C "COMMENT" \
      -f SSH_PRIVATE_KEY -N "" 1>/dev/null

aws ec2 import-key-pair --key-name SSH_KEY_PAIR_NAME \
      --public-key-material fileb://

Replace the following:

  • SSH_PRIVATE_KEY: a file name to save the key in
  • SSH_KEY_PAIR_NAME: a name you choose for the key pair
  • COMMENT: a text string describing the key

What's next