-
Notifications
You must be signed in to change notification settings - Fork 23
Logs
Pulkit Singhal edited this page Sep 6, 2016
·
1 revision
# it isn't required but I ended up working out of this directory
$ cd ~/dev/docker-awscli
# use a docker image since installing aws-cli on the mac didn't work out
# mounted volume allows downloaded logs to be viewed in host machine
$ docker run --rm -it \
-v /Users/pulkitsinghal/dev/docker-awscli:/apps \
--env-file=/Users/pulkitsinghal/dev/docker-awscli/envvars \
xueshanf/awscli \
/bin/bash
## now we can use the CLI inside the docker image
# lets list all buckets
$ aws s3 ls
# lets copy / download logs from s3 to local filesystem
# since we mounted the volume on docker, anything downloaded
# to that volume in docker is also available on the laptop / host
$ aws s3 cp \
s3://<customer-logentries-bucket-name>/path/to/customer/containers-log \
/apps/ --recursive
# after downloading logs and maybe removing ones for dates that we don't want
# we can quickly stitch them together ...
# HOPING that the stiching is sorting the filenames in ascending alphabetical order
# light googling says that is indeed the case
$ cat *.log > all.log
# For downloading worker logs which were transferred
# from `ironworker to papertrail to s3`
$ aws s3 cp \
s3://<customer-papertrail-bucket-name>/path/to/customer/logs/ \
/apps/workers/ --recursive