How do I set a binary value on a secret in AWS Secrets Manager using the CLI?
The docs say:
--secret-binary (blob)
(Optional) Specifies binary data that you want to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then use the appropriate technique for your tool to pass the contents of the file as a parameter.
I have tried the following:
$ V=$(cat mykeystore.jks)
$ aws secretsmanager put-secret-value --secret-id xxx --secret-binary "$V"
'utf8' codec can't decode byte 0xfe in position 0: invalid start byte