Importing certificates to AWS Certificate Manager (ACM) and IAM

We often need to have secure certificates in our applications and load balancers, in this tutorial I will show you how to import secure certificates into ACM.

In this example I will demonstrate how to import a private certificate created with OpenSSL.

Creating an RSA certificate with OpenSSL valid for 365 days in Ubuntu 20.04

openssl req -newkey rsa:2048 -new -nodes -x509 -days 365 -keyout /tmp/key.pem -out /tmp/cert.pem

With the certificate body (cert.pem) and the created key (key.pem) we will import to AWS, first let’s import into ACM.

aws acm import-certificate --certificate fileb:///tmp/cert.pem --private-key fileb:///tmp/key.pem --tags Key=Name,Value=CA-TEST
Result on the ACM console

Now we are going to import the same certificate into the IAM.

aws iam upload-server-certificate --server-certificate-name CA-TEST --certificate-body file:///tmp/cert.pem --private-key file:///tmp/key.pem
AWS CLI result of certificate imported into IAM

I hope I helped you with this post!

Bye!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store