Created
July 20, 2017 02:54
-
-
Save vizowl/e3ef85d3bab0a3f311e7e068d70a003f to your computer and use it in GitHub Desktop.
List objects in bucket via amazonks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Lens | |
import Network.AWS | |
import Network.AWS.S3 | |
main :: IO () | |
main = do | |
e <- newEnv Discover <&> set envRegion Sydney | |
ex <- runResourceT . runAWS e $ send $ listObjects $ BucketName "BUCKET_NAME" | |
print [ (x ^. oKey, x ^. oETag) | x <- ex ^. lorsContents ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment