File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "Parameters" : [
3+ {
4+ "Name" : " Steve Rogers" ,
5+ "Value" : " Captain America" ,
6+ "Type" : " String" ,
7+ "Description" : " Sentinel of Liberty, Avenger"
8+ },
9+ {
10+ "Name" : " Peter Parker" ,
11+ "Value" : " Spider-Man" ,
12+ "Type" : " String" ,
13+ "Description" : " Friendly Neighborhood, Avenger"
14+ }
15+ ]
16+ }
Original file line number Diff line number Diff line change 1+ import json
2+
3+ with open ("./aws-ssm-parameters.json" ) as file :
4+ data = json .load (file )
5+ for item in data ["Parameters" ]:
6+ cmd = f'aws ssm put-parameter --name "{ item ['Name' ]} " \
7+ --description "{ item ['Description' ]} " --value "{ item ['Value' ]} " \
8+ --type "{ item ['Type' ]} " --overwrite'
9+ print (f'Executing AWS SSM command: { cmd } ' )
10+ # Execute the command to put the data in AWS Parameter Store
11+ # It is commented out in the example, but in order to execute
12+ # the following lines, AWS CLI must be installed first!
13+ # https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
14+ # import os
15+ # os.system(cmd)
You can’t perform that action at this time.
0 commit comments