How to use Certificate Manager to support encrypted traffic in application load balancer in AWS CDK with Python — Infrastructure as Code (IaC)

When you have an application load balancer on AWS and want to use SSL on your traffic into the application load balancer you need to create a certificate with Certificate Manager and then apply it to the application load balancer when the certificate is valid.

So what I will show you here is how you can create the SSL Certificate from the AWS Web Console using Certificate Manager, I think it's an easier way to do rather than directly from AWS CDK (CloudFormation) because its something you normally only do once for each domain, then after I will explain how it's working from the AWS CDK in Python to build it as Infrastructure as Code (IaC) so you can reuse the code for multi-domains or sub-domains using the application load balancer as you need.

Create SSL Certificate with Certificate Manager using AWS Web Console

Go to Certificate Manager and click “Request” where you will start to request a new SSL Certificate where you should select the public certificate.

For this test, I will add a subdomain called lb-test and add a second domain called *.lb-test to accept subdomains on the lb-test…

--

--

Paris Nakita Kejser
DevOps Engineer, Software Architect and Software Developering

DevOps Engineer, Software Architect, Software Developer, Data Scientist and identify me as a non-binary person.