Skip to content

Example project using Clojure 1.10's datafy/nav and the REBL to browse S3

License

Notifications You must be signed in to change notification settings

carylee/s3-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Browser

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.

Prerequisites

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.

Installing the REBL to your local repository

  1. Add the lein-localrepo leiningen plugin to your profiles.clj
  2. Download and unzip the REBL
  3. 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```

Usage

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.

Caveats

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).

Resources

About

Example project using Clojure 1.10's datafy/nav and the REBL to browse S3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published