Can I retrieve the random ssh password on aws to be used in packer

I am using openssh on AWS windows and its configured to generate a random password
is there a way to get the random password