1
0

cl-test.py 330 B

12345678910111213
  1. import subprocess
  2. import json
  3. cmd='aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=RunInstances --max-results 20 --region us-east-1'
  4. cmds=cmd.split(' ')
  5. cl=subprocess.run(cmds,text=True)
  6. clstr=str(cl)
  7. lines=clstr.split('\n')
  8. for l in lines:
  9. print(l)
  10. #js=json.loads(str(cl))
  11. #print(js)