S3 Browser is a toy project to learn and demo the use of Clojure 1.10's nav function.
Using the REBL, you can list S3 buckets, browse the keys
in a bucket by prefix (like navigating a file tree), and even preview file contents.
All this is done with minimal code by implementing the Navigable
protocol on S3 buckets, prefixes, and objects.
S3 Browser expects you to already have the REBL locally, in form of the com.cognitect/rebl "0.9.109"
artifact installed to your local maven repository.
- Add the lein-localrepo leiningen plugin to your
profiles.clj
- Download and unzip the REBL
- Use the lein-localrep plugin to install the REBL to your m2 repository
lein localrepo install REBL-0.9.108.jar com.cognitect/rebl 0.9.109```
Start a repl using lein repl
. This will default to the user
namespace, which refers to the core function ls
.
Launch the REBL:
(rebl/ui)
In the REBL, evaluate the ls
function to list buckets in your account:
(ls)
From there, you can navigate the S3 buckets in your AWS account using the REBL graphically. Note: you will not be able to navigate to buckets you do not have permission to list.
S3 Browser uses your default AWS credential chain and settings. It doesn't currently work with cross-region buckets, so requests will be made in the default region for your AWS profile (look at your ~/.aws/config
).
S3 Browser also is only intended to demo nav
and the REBL, so it isn't tested extensively, nor does it have any error handling. The REBL itself, however, gracefully presents stack traces (themselves implementing datafy
and nav
).
- Stuart Halloway's REBL talk from Clojure/conj 2018
- Sean Corfields Datafy and Nav blog post
- Jay Zawrotny's lein-rebl-example