Skip to content

Instantly share code, notes, and snippets.

@riandyrn
Last active July 14, 2024 06:12
Show Gist options
  • Save riandyrn/049eaab390f604eae4bf2dfcc50fbab7 to your computer and use it in GitHub Desktop.
Save riandyrn/049eaab390f604eae4bf2dfcc50fbab7 to your computer and use it in GitHub Desktop.
Self Signed SSL Certificate for AWS Application Load Balancer

Self Signed SSL Certificate for AWS ALB

  1. Generate private key

    $> openssl genrsa 2048 > my-private-key.pem
  2. Generate certificate using private key, you will be prompted to fill some fields. Fill required fields randomly, except for Common Name fill it with *.amazonaws.com or your valid domain name

    $> openssl req -new -x509 -nodes -sha256 -days 365 -key my-private-key.pem -outform PEM -out my-certificate.pem
  3. Upload certificate & its private key to Amazon Certificate Manager

    $> aws acm import-certificate --certificate file://my-certificate.pem --private-key file://my-private-key.pem
  4. Certificate should now show up in AWS Console for ALB

@jackishere
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment