The AWS Fingerprints listed on the Key Pairs page (in the ec2 web console) are not derived in a simple ssh-keygen
fashion. Instead of installing their custom tools (ec2-api-tools, which is java) to compare fingerprints with keys locally, you can use the following command to generate the fingerprint on either the private or public key.
openssl pkcs8 -in ~/Downloads/stockx.pem -nocrypt -topk8 -outform DER | openssl sha1 -c