Skip to content

how to escape special characters while parsing them as parameters in AWS CLI commands

0

I have to store database password as an AWS secret, which contains characters like, [ ' . While parsing them as parameters in CLI commands I'm facing an error as expected as , instead '

Please guide me to resolve the issue

asked 2 years ago213 views

1 Answer
1

Hello.

What kind of secret are you specifically trying to register?
I tried including special characters when registering the secret as shown below, but I could not reproduce the problem.
https://docs.aws.amazon.com/cli/v1/userguide/cli_secrets-manager_code_examples.html

aws secretsmanager put-secret-value --secret-id MyTestSecret --secret-string "{\"user\":\"diegor\",\"password\":\"[test'_\"}"
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.