AWS CDK — Create domain into route53 HostedZone, request SSL certificate with Certificate Manager, create an alarm when the SSL is expired, and save your DNS queries metric data for monitoring

Paris Nakita Kejser
3 min readMar 27, 2022

When I start working with Amazon Cloudformation (AWS CDK) in Python one of the biggest questions is, how can I automatic setup a domain DNS (HostedZone) with metric data so I can monitor my DNS queries and in the end we all know SSL it's very important so I need to create an SSL for the domain by using Certificate Manager for that if the SSL is expired I need to know that so for that I need to know how it's working with CloudWatch.

All of these things are the first step for me to know more about how to work in Amazon Cloudformation (AWS CDK) because I’m not interested in using the console interface to minimize human mistakes and by using Infrastructure as Code I know another person can take over my infrastructure and read my code to know what going on.

Setup domain with route53.HostedZone

To work with the certificate manager and cloud watch we need to have a domain inside our route53 by creating it as HostedZone, our test domain here I called my-domain.com I will recommend using your own

--

--

Paris Nakita Kejser
Paris Nakita Kejser

Written by Paris Nakita Kejser

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