Amazon CloudFront Create a trusted key pair group

Make sure OpenSSL is installed on your machine.

Run the following command to generate Public and Private key pairs:

openssl genrsa -out /Downloads/private_key.pem 2048

openssl rsa -pubout -in /Downloads/private_key.pem -out /Downloads/public_key.pem

The above commands will generate the private and public key pairs in the Downloads folder. You can change the path based on your needs. Open the public key in a text editor and paste it in the Create Public key section on Amazon CloudFront console site

Provide a valid key name and save it.

You can use that public key in CloudFront > Key groups > Create key group section with the following fields:

  • Name: <Your desired name for the group>
  • Public keys: <Select the key which your created in the previous step>

We are done with creating a trusted keypair and key groups.