如何使用 CLI 在 AWS Secrets Manager 中为密钥设置二进制值?
该文件说:
--secret-binary (blob)
(可选)指定要加密并存储在新版本密钥中的二进制数据。要在命令行工具中使用此参数,我们建议您将二进制数据存储在文件中,然后使用适合您的工具的适当技术将文件内容作为参数传递。
我尝试了以下方法:
$ 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
Run Code Online (Sandbox Code Playgroud)