If you developed that script in your employer's time it already belongs to your employer, I'd strongly advise against 'clever' ideas like turning something built during work time to independent gig.
Well, if he worked at AWS as either an SA or in the consulting department (ProServe), it’s easy enough to legitimately do work on the company time and have the code accessible to him
after he leaves.
For those departments, once you know the process, you can submit your code - that doesn’t contain customer information - to be approved to be released as open source on AWS Samples with an MIT license.
The approval process doesn’t go through your manager. There is an entirely separate team and the turn around for approval is usually less than a week.
I was able to have access to all of the frameworks and utilities I wrote from scratch for customers after I left by going through the process. It was all above board.