# HowTo Retrieve Key and Cert from PFX

Here’s a good article on how to export SSL certificates, extract the key and certificate, and import it into AWS.

<span data-annotation-inline-node="true" data-annotation-mark="true" data-card-url="https://www.bluelabellabs.com/blog/how-to-export-certificates-from-windows-for-use-in-apache-nginx-on-linux/" data-inline-card="true" data-renderer-start-pos="116"><span class="loader-wrapper"><span data-testid="hover-card-trigger-wrapper" role="button">[<span class="_o5721jtm _1nmz9jpi _16d9qvcn _ca0qv77o _u5f31b66 _n3tdv77o _19bv1b66" data-testid="inline-card-icon-and-title"><span class="smart-link-title-wrapper">How To Convert Windows PFX Certificate Files Into PEM Format On Linux</span></span>](https://www.bluelabellabs.com/blog/how-to-export-certificates-from-windows-for-use-in-apache-nginx-on-linux/)</span></span></span>

The above article uses openSSL, which can be found for Windows, here:

<span data-annotation-inline-node="true" data-annotation-mark="true" data-card-url="https://slproweb.com/products/Win32OpenSSL.html" data-inline-card="true" data-renderer-start-pos="192"><span class="loader-wrapper"><span data-testid="hover-card-trigger-wrapper" role="button">[<span class="_o5721jtm _1nmz9jpi _16d9qvcn _ca0qv77o _u5f31b66 _n3tdv77o _19bv1b66" data-testid="inline-card-icon-and-title"><span class="smart-link-title-wrapper">Win32/Win64 OpenSSL Installer for Windows - Shining Light Productions</span></span>](https://slproweb.com/products/Win32OpenSSL.html)</span></span></span>

As well, the above article has an error in Step 4, that removes the password from the key.pem to create the raw private key file.

That command should be:

```bash
openssl rsa -in key.pem -out server.key
```