Create CloudFront Key Pair
For a project I'm working on, we are going to use signed cookies for authorizing our CloudFront requests for the various files that make up the encoded HLS video. For this, the code that generates the signed cookie needs to know both the name of the key in AWS, and the path to the private key on the server that should be used for generating the request.
Log into your account as root (you can't perform these steps with IAM users). Then click My Security Credentials
If you see the following modal, click Continue to Security Credentials
Click on CloudFront key pairs, and then click Create New Key Pair.
Download the public and private key pairs. You probably won't be able to tell from the filenames which is the public and which is the private key, but if you open them in a text editor, it becomes obvious. I recommend doing this and renaming the files to make this obvious.
Make note of the Access Key ID as you will need this later when writing the code for generating the signed cookie.
Congrats, you now have a CloudFront key pair.
First published: 24th October 2019