aws secretsmanager

Store, manage, and retrieve secrets. More information: https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/.

aws secretsmanager list-secrets

aws secretsmanager list-secrets --query 'SecretList[*].{Name: Name, ARN: ARN}'

aws secretsmanager create-secret --name {{name}} --description "{{secret_description}}" --secret-string '{{secret}}'

aws secretsmanager delete-secret --secret-id {{name|arn}}

aws secretsmanager describe-secret --secret-id {{name|arn}}

aws secretsmanager get-secret-value --secret-id {{name|arn}} --version-stage {{version_of_secret}}

aws secretsmanager rotate-secret --secret-id {{name|arn}} --rotation-lambda-arn {{arn_of_lambda_function}}

aws secretsmanager rotate-secret --secret-id {{name|arn}} --rotation-lambda-arn {{arn_of_lambda_function}} --rotation-rules AutomaticallyAfterDays={{30}}