Let’s apply SSL cert on AWS ALB

Target group

Assign your EC2 instance(s) as target group for the load balancer to distribute traffic.

Also, HTTPS works only for domains like codingmates.com. It does not work for pure IP addresses like 3.18.bla bla.

Domain has to be linked with the IP address of the EC2 server. I thought domain has to be linked with domain name of the Load Balancer cuz ALB acts in front of EC2 servers and distributes request.

Important precaution

We need to enter the cert key and body.

Very imporant: When you copy and paste the key and body, you MUST include :

-----BEGIN RSA PRIVATE KEY-----   <- this
bla bla
-----END RSA PRIVATE KEY-----     <- and this

These begin and end lines are to be included.