From the accepted Stack Overflow answer: Use the --query option of the CLI to extract just the secret. aws secretsmanager get-secret-value --secret-id secrets --query SecretString --output text

Context: Problem: Accepted solution (score 150): Use the --query option of the CLI to extract just the secret. aws secretsmanager get-secret-value --secret-id secrets --query SecretString --output text