Skip to content

Instantly share code, notes, and snippets.

@squarepegsys
Created May 17, 2019 15:09
Show Gist options
  • Save squarepegsys/864d996f8bdebb76b56c6bfe9511be97 to your computer and use it in GitHub Desktop.
Save squarepegsys/864d996f8bdebb76b56c6bfe9511be97 to your computer and use it in GitHub Desktop.
search and show wrapper around awslogs
#!/bin/bash
# Quick and dirty script to find the log and show it via https://github.com/rpgreen/apilogs
# basically this automates the work I would do 90% of the time
if [ -z "$1" ]
then
echo "no stream supplied!"
exit 13
fi
group=`awslogs groups|grep $1`
start=""
if [ "$2" ]
then
start="-s $2"
fi
awslogs get $group ALL $start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment