Working with AWS S3 is a pain in scripts and notebooks. I wrote s3stasher to make it better.
Wrap any file reading function with s3stasher and it will just work for both local and remote files! Files from S3 are cached and only downloaded if out of date. It even works if you're offline, yielding a local copy of the file if one exists (and raising an error if the file is not cached).
Give it a try, let me know your feedback, and feel free to make a PR.
pip install s3stasher
https://github.com/bsiranosian/s3stasher