Know How Guide and Hands on Guide for AWS
You can create an SSL/TLS certificate for your application with OpenSSL. OpenSSL is a standard, open source library that supports a wide range of cryptographic functions, including the creation and signing of certificates. For more information about OpenSSL, visit https://www.openssl.org/
openssl genrsa 2048 > privatekey.pem
openssl req -new -key privatekey.pem -out csr.pem
You can submit the signing request to a third party for signing, or sign it yourself for development and testing
openssl x509 -req -days 365 -in csr.pem -signkey privatekey.pem -out public.crt
aws iam upload-server-certificate --server-certificate-name keycloak-webdemo-certificate \
--certificate-body file://public.crt --private-key file://privatekey.pem \
--path /cloudfront/keycloak-webdemo/ --region cn-north-1
aws iam get-server-certificate --server-certificate-name keycloak-webdemo-certificate --region cn-north-1
aws iam list-server-certificates --region cn-north-1
aws iam update-server-certificate --server-certificate-name keycloak-webdemo-certificate \
--new-server-certificate-name CloudFrontCertificate \
--new-path /cloudfront/newpath --region cn-north-1
aws iam delete-server-certificate --server-certificate-name keycloak-webdemo-certificate
Note: If you upload a server certificate to be used with Amazon CloudFront, you must specify a path using –path. The path must begin with /cloudfront and the path must include a trailing slash, for example, /cloudfront/test/
Upload and import an SSL certificate to AWS Identity and Access Management (IAM)
Troubleshoot issues with using a custom SSL certificate for my CloudFront distribution