とりあえずのもだったので、できるだけ簡単にアップロードまで出来るようにしてみました。
(“non-interactive”です)
openssl req -new -nodes -x509 -subj '/C=JP/ST=Tokyo/L=Minato-ku/O=cloudpack/CN=test.xxx' -keyout test.key -out test.crt aws iam upload-server-certificate --server-certificate-name test --certificate-body file://test.crt --private-key file://test.key
実行するとこんな感じです。
$ openssl req -new -nodes -x509 > -subj '/C=JP/ST=Tokyo/L=Minato-ku/O=cloudpack/CN=test.clp-staging.jp' > -keyout test.key -out test.crt Generating a 2048 bit RSA private key ...............................+++ ...+++ writing new private key to 'test.key' ----- $ aws iam upload-server-certificate > --server-certificate-name test > --certificate-body file://test.crt > --private-key file://test.key { "ServerCertificateMetadata": { "ServerCertificateId": "ASCAJ6BNSQAUEJ5Q3RQZ2", "ServerCertificateName": "test", "Expiration": "2015-07-25T06:12:15Z", "Path": "/", "Arn": "arn:aws:iam::639706874414:server-certificate/test", "UploadDate": "2015-06-25T06:12:16.174Z" } }