如何在 aws 参数存储中存储/获取 json [英] How to store/get json to/from aws parameter store

查看:68
本文介绍了如何在 aws 参数存储中存储/获取 json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Livy REST API 提交 Spark 应用.

I use Livy REST API to submit Spark app.

{
  "file": <application-jar>,
  "className": "<main-class>",
  "args": my_args,
  "conf": my_conf
}

my_args = [args1, args2, ...]
my_conf = {'foo1': 'bar1', 'foo2': 'bar2'...}

我希望 my_conf (json secrets) 存储在 AWS SSM 参数存储中,并在我使用 Livy 的 python 脚本提交 spark 应用程序时从参数存储中使用它.如何存储和获取(在python中获取相同的json)my_conf到/从参数存储?

I want my_conf (json secrets) to store in AWS SSM parameter store and to use it from parameter store when my python script using Livy submits spark app. How to store and get(get in python the same json) my_conf to/from parameter store?

推荐答案

我过去曾成功使用过此实用程序.优点是它构建了一个配置,如果您愿意,可以在 ssm 中读取和编辑.

I have used this utility with success in the past. The advantage is it builds a config that's human readable and editable in ssm should you so choose.

https://github.com/b-b3rn4rd/json2ssm

这篇关于如何在 aws 参数存储中存储/获取 json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆