Skip to content

Instantly share code, notes, and snippets.

@sahilsk
Created June 7, 2020 08:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sahilsk/3253a832bea51dd476c42f21041c974b to your computer and use it in GitHub Desktop.
Save sahilsk/3253a832bea51dd476c42f21041c974b to your computer and use it in GitHub Desktop.
aws sts decode-authorization-message
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))
@sahilsk
Copy link
Author

sahilsk commented Jun 7, 2020

How to use?

python ../sts-deocde.py  xxxxxEncodedMessageStringxxxxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment