Created
May 12, 2021 19:35
-
-
Save knowsuchagency/f1c82a7123a2af6aad25477e8a3f323f to your computer and use it in GitHub Desktop.
fetch schemas from EventBridge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import shlex | |
import subprocess as sp | |
from pprint import pprint | |
registry = "foo" | |
schema_name = "bar" | |
cmd = f"aws schemas describe-schema --registry-name={registry} --schema-name={schema_name}" | |
process = sp.run(shlex.split(cmd), capture_output=True) | |
captured_json = json.loads(process.stdout) | |
schema = json.loads(captured_json["Content"]) | |
pprint(schema) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment