Skip to content

Instantly share code, notes, and snippets.

@ksatirli
Created August 15, 2017 07:19
Show Gist options
  • Save ksatirli/85b8bccc13834d999cc366191a37073e to your computer and use it in GitHub Desktop.
Save ksatirli/85b8bccc13834d999cc366191a37073e to your computer and use it in GitHub Desktop.
AWS: get EC2 Instance screenshot
#!/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