amazon-web-servicesaws-ssm

How to retrieve earlier version of AWS SSM password?


I use the AWS parameter store like so aws ssm get-parameters --names WINDOWS_PASSWORD --with-decryption --query Parameters[0].Value --output text, but sometimes I need the earlier previous of the password when it rotates.

I don't understand for example how to retrieve version 1 of the password with the CLI, as opposed to say the latest version 2.


Solution

  • Normally you would just append version to the name:

    For example, to get the first version:

    aws ssm get-parameters --names WINDOWS_PASSWORD:1 --with-decryption --query Parameters[0].Value --output text