Created
June 7, 2020 08:18
-
-
Save sahilsk/3253a832bea51dd476c42f21041c974b to your computer and use it in GitHub Desktop.
aws sts decode-authorization-message
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 boto3 | |
import json | |
import sys | |
encodedMessageStr = sys.argv[1] | |
client = boto3.client('sts') | |
response = client.decode_authorization_message( | |
EncodedMessage=encodedMessageStr | |
) | |
decodedMessageJson = json.loads(response['DecodedMessage']) | |
print(json.dumps(decodedMessageJson, indent=4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use?