0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SSMパラメータの一覧と値を取得する方法

Posted at

Nameの一覧を取得する

describe-parametesで一覧を取得してjqでNameを出力

REGION=ap-northeast-1
aws ssm describe-parameters --region $REGION | jq -r '.Parameters.[].Name'

結果

/parameter/name1
/parameter/name2
/parameter/name3

Nameと値を取得する

REGION=ap-northeast-1
for parameter in $(aws ssm describe-parameters --region $REGION | jq -r '.Parameters.[].Name'); do 
aws ssm get-parameter --name $parameter --region $REGION | jq -r '.Parameter | [.Name,.Type,.Value] | @csv'
done;

結果

"/parameter/name1","String","value1"
"/parameter/name2","String","value2"
"/parameter/name3","String","value3"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?