AWS Windows password rotation with Custom Secret Manager

The Issue

When you create a Windows machine in AWS you can get the password some minutes after the machine creation using the pem key from the web console to retrieve it.

The problem is that this password will remain the same for the whole life of the machine. So also if a person leaves the company and loose AWS credentials if he has…