MVFM

s3/get_object

Download an object from S3 and read its body

const app = mvfm(prelude, s3_);
const prog = app({}, ($) => {
  return $.begin(
    $.s3.putObject({
      Bucket: "my-bucket",
      Key: "data.json",
      Body: '{"count":42}',
    }),
    $.s3.getObject({ Bucket: "my-bucket", Key: "data.json" })
  );
});
await fold(
  defaults(app, { s3: memoryS3Interpreter }),
  prog
);
Ctrl+Enter