CmdID / aws / aws secretsmanager
aws secretsmanager get-random-password
Generates a random password. AWS CLI reference
1 example 8 options Its page in the AWS CLI reference
Examples
To generate a random password
The following get-random-password example generates a random password 20 characters long that includes at least one uppercase letter, lowercase letter, number, and punctuation.
aws secretsmanager get-random-password --require-each-included-type --password-length 20Identify--require-each-included-typeSpecifies whether to include at least one upper and lowercase letter, one number, and one punctuation.--password-lengthThe length of the password.Its output
{
"RandomPassword": "EXAMPLE-PASSWORD"
}For more information, see Create and manage secrets in the Secrets Manager User Guide.
Options
--exclude-charactersA string of the characters that you don't want in the password.--exclude-lowercaseSpecifies whether to exclude lowercase letters from the password.--exclude-numbersSpecifies whether to exclude numbers from the password.--exclude-punctuationSpecifies whether to exclude the following punctuation characters from the password: !--exclude-uppercaseSpecifies whether to exclude uppercase letters from the password.--include-spaceSpecifies whether to include the space character.--password-lengthThe length of the password.--require-each-included-typeSpecifies whether to include at least one upper and lowercase letter, one number, and one punctuation.