Generating self-signed certificates

We will use openssl to create the keys and the certificates, so make sure you have it installed on your development machine. From the command line, execute the following command (on an OS X or Linux machine):

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes -days 3650

This creates a 2048 bit RSA private key (in the key.pem file). The private key is used to sign the certificate (the cert.pem file). While generating the signed certificate, ensure you enter the correct information for Common Name (for example, server FQDN or YOUR name). Here, we have used the ELB public DNS name:

Generating a 2048 bit RSA private key..........+++............................................................................................................+++ ...

Get Learning AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.