gpt4 book ai didi

amazon-web-services - 直接将文件管道传输到AWS SSM参数存储?

转载 作者:行者123 更新时间:2023-12-03 13:54:48 24 4
gpt4 key购买 nike

只是好奇如何直接将文件通过管道传输到AWS ssm参数存储?例如

# Put into ssm parameter store
cat my_github_private.key | aws ssm put-parameter --region ap-southeast-1 --name MY_GITHUB_PRIVATE_KEY --type SecureString --key-id alias/aws/ssm --value ???
# And read it back
aws ssm get-parameter --region ap-southeast-1 --name MY_GITHUB_PRIVATE_KEY --with-decryption --query Parameter.Value --output text > my_github_private.key.1
# Two should be identical
diff my_github_private.key my_github_private.key.1

最佳答案

除了直接从stdin中获取值之外,您还可以直接将其添加到命令行参数中吗?

aws ssm put-parameter \
--region ap-southeast-1 \
--name MY_GITHUB_PRIVATE_KEY \
--type SecureString \
--key-id alias/aws/ssm \
--value "$(cat my_github_private.key)"

关于amazon-web-services - 直接将文件管道传输到AWS SSM参数存储?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48659105/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com