I am trying to create one secrets manager using aws cli command. The command I tried is
aws secretsmanager create-secret \
--name sample_auth_aws_secret1 \
--description "My test secret created with the CLI." \
-- tags {"env":"dev","sample=test"} \
--secret-string "{\"clientId\":\"sample123\",\"secret\":\"wjwjwjwjwjwjwjsjsjsj\"}"
I am getting error
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: env:dev, sample=test, --secret-string, {"clientId":"sample123","secret":"wjwjwjwjwjwjwjsjsjsj"}, tags
What did I do wrong?
There are two problems in your command.
please use below command
aws secretsmanager create-secret \
--name sample_auth_aws_secret1 \
--description "My test secret created with the CLI." \
--tags '{"Key":"CostCenter","Value":"12345"}' \
--secret-string "{\"clientId\":\"sample123\",\"secret\":\"wjwjwjwjwjwjwjsjsjsj\"}"