Created
August 15, 2017 07:19
-
-
Save ksatirli/85b8bccc13834d999cc366191a37073e to your computer and use it in GitHub Desktop.
AWS: get EC2 Instance screenshot
This file contains 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
#!/bin/bash | |
aws \ | |
--profile="withmethod" \ | |
--region="eu-west-1" \ | |
ec2 \ | |
get-console-screenshot \ | |
--instance-id "i-01a2bc34d5d67e89f" \ | |
| jq \ | |
--raw-output \ | |
".ImageData" \ | |
| base64 \ | |
--decode > "instance-screenshot.jpg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment