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
Mario Loria is a builder of diverse infrastructure with modern workloads on both bare-metal and cloud platforms. He's traversed roles in system administration, network engineering, and DevOps. You can learn more about him here.