Hướng dẫn tạo Let’s Encrypt Certificates dưới local và import vào AWS Certificate Manage

SSL/TLS certificates thì được dùng phổ biến trong hệ thống nhằm tăng cường security. Và việc load balancer, Gateway,… thì cấu hình này khá phức tạp và AWS Certificate Manage (ACM) sẽ giúp cho việc này dễ dàng quản lý hơn. Trong bài này mình sẽ share cách tích hợp Let’s Encrypt Certificates (miễn phí) trên ACM.

1. Cài đặt Certbot của Let’s Encrypt Certificates

Tài liệu tham khảo: https://certbot.eff.org/

Nếu dùng MacOS thì cài từ brew cho lẹ https://formulae.brew.sh/formula/certbot

2. Execute certbot và cấu hình DNS để tạo Certificate cho domain dưới local

Sau khi execute command ở trên sẽ xuất hiện thông tin set up DNS trên domain.

  • Type: TXT
  • Name: _acme-challenge
  • Value: 3qFPwRcxEd…

Sau khi add xong TXT trên DNS thì chờ vài giây hoặc vài phút mới apply. Trong lúc chờ có thể confirm bằng cách access vào URL Toolbox của google check https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challen…

3. Import Certificate vào ACM (AWS Certificate Manage)

Sau khi generate certificate ta sẽ có 4 files:

  • /etc/letsencrypt/live/domain.com/cert.pem
  • /etc/letsencrypt/live/domain.com/privkey.pem
  • /etc/letsencrypt/live/domain.com/chain.pem
  • /etc/letsencrypt/live/domain.com/fullchain.pem

Sau khi access AWS Certificate Manage, chọn import.

Lúc này nhập thông tin tương ứng các field sau:

  • Certificate Body, sử dụng cert.pem
  • Certificate Private Key, sử dụng privkey.pem
  • Certificate Chain, sử dụng fullchain.pem

Sau khi nhập đúng thông tin thì Next tới màn hình review thông tin Certificate rồi Import thôi.

Sau khi import xong thì giờ có thể tích ACM này vào Gateway,… cần certifcate.

Sliding Sidebar

About Me

About Me

Hello, my name is Dũng (Johnny). Welcome to my blog.

As I’m a developer, I write about topics related to the field of programming, mainly from a technical point of view. On this blog you’ll find posts which encourage discussion, information about development trends, case studies, reviews, tutorials, tips on how to improve your effectiveness, and anything else that might be fascinating to people from the IT industry.
I love PHP, NodeJS, Java,... and Fullstack.