I went to Security credentials, created ** CloudFront key pairs** and then download the private and public key.
I then went into CloudFront and copied and pasted the public key I got from the first step into there.
Created the **Keygroup **and selected the above Public Key.
I went to the CloudFront distribution, then to Behavior and selected Restrict viewer access then Trusted key groups (recommended) and chose the group I created above.