'Auto-Delete AWS resources that use TLS1.1 or older

I am a newbie and really need some help for a script please.

How would I automate the deletion of any public facing endpoint resources(API gateway, ELB, Cloudfront distribution, ELBv2) in my AWS Environment that are using a TLS version of 1.1 or below?

I am trying to make only the ones with TLS 1.2 remain.

I have resources that have a weak TLS version and am trying to automate the deletion process.

Thank you for your help, it is much appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source