0

Is there a way to read all objects from given s3 bucket as s3 Source with alpakka ? I need something like this (pseudocode):

S3.readObjects(bucket)
  .map(object => parseJson(object.getContent))
  ...

There are two sources provided by alpakka s3 integration: S3.listBucket(bucket) and S3.download(bucket, key) but I failed to combine those 2 together to achieve desired behaviour. I'm completely new to akka streams, should I combine those two or is there other way ?

I'm using akka-stream 2.5.31 and alpakka 2.0.0

Normal
  • 1,347
  • 4
  • 17
  • 34
  • 1
    I don't fully understand the return type of `S3.download` so I am not able to produce a correct code snippet but generally `flatMapConcat` is what you need to flatten multiple `Source`s into one – yiksanchan May 29 '20 at 17:58
  • thanks for the answer, at the moment I come up with using just ordinary s3 client for downloading object as a Flow. Will look into `flatMapConcat` – Normal May 30 '20 at 14:01

0 Answers0