Create and Navigate to Log Download Directory
mkdir j-3PS6MU0W27GMG
cd j-3PS6MU0W27GMG
Download Logs
Note: j-3PS6MU0W27GMG is the Cluster ID
aws s3 sync s3://aws-logs-xxx-ap-northeast-1/elasticmapreduce/j-3PS6MU0W27GMG .
Decompress
find . -type f -exec gunzip {} \;
Search for Errors and Warnings
Sort in chronological order
find . | grep log | xargs egrep "WARN|ERROR" | sort -k2