상세 컨텐츠

본문 제목

[AWS]사설인증서어서 등록하기

기타

by stayhungri 2022. 5. 26. 23:52

본문

개발환경으로 AWS 를 사용하고 있는데 https 가 필요해서 사설인증서를 만들어 보았습니다.

도메인을 새로 만드는 방법도 있지만 외부에서 해당 도메인을 통해 접속하는 것을 막고 싶은 부분도 있었습니다.

순서는 아래와 같습니다.

 

1. 개인키 생성

$ openssl genrsa -out trufflesalt.key 2048
Generating RSA private key, 2048 bit long modulus
..............................................................+++
..+++
e is 65537 (0x10001)

 

2. 개인키로 인증서 생성

$ openssl req -new -key trufflesalt.key -out trufflesalt.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) []:KR
State or Province Name (full name) []:Seoul
Locality Name (eg, city) []:Seoul
Organization Name (eg, company) []:trufflesalt
Organizational Unit Name (eg, section) []:salt
Common Name (eg, fully qualified host name) []:trufflesalt.io
Email Address []:trufflesalt@ggmail.com

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:

3. AWS  Certificate Manager 에서 인증서 생성

AWS Certificate Manager 로 이동해서 "가져오기" 클릭
위에 만들었던 파일에 내용을 그대로 복사해서 붙여넣습니다.

 

태그는 입력 안해도 됩니다.

 

내용 확인하고 "가져오기" 클릭

 

생성된 것을 확인

 

이제 등록된 사설인증서를 사용하시면 됩니다.

관련글 더보기