![](/img/trans.png)
[英]Google Secret Manager secrets do not seem to work yet I can find nothing wrong
[英]Secrets Manager can't find the specified secret value for staging label
我一直在尝试在命令行上创建秘密,如下所示:
~/$ aws secretsmanager create-secret --name first-secret
{
"ARN": "arn:aws:secretsmanager:us-east-2:123456789012:secret:first-secret-9ez7W2",
"Name": "first-secret"
}
~/$ aws secretsmanager get-secret-value --secret-id first-secret
An error occurred (ResourceNotFoundException) when calling the GetSecretValue operation: Secrets Manager can't find the specified secret value for staging label: AWSCURRENT
如果我在 AWS 控制台上创建秘密(接受默认选择),我可以毫无问题地“获取秘密值”。
AWS 控制台和命令行在这方面有什么区别?
抛出(无用的)错误消息是因为在创建后尚未设置秘密值。
以下是如何让事情正常进行:
$ aws secretsmanager create-secret --name first-secret
$ aws secretsmanager put-secret-value --secret-id first-secret --secret-string "foo@"
$ aws secretsmanager get-secret-value --secret-id first-secret
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.