@multicloud/sls-aws
Version:
Amazon AWS specific middleware and components for Serverless @multicloud.
25 lines (24 loc) • 778 B
TypeScript
/// <reference types="node" />
import { CloudStorage, ReadBlobOptions, WriteBlobOptions, WriteBlobOutput } from "@multicloud/sls-core";
import { Stream } from "stream";
import "reflect-metadata";
/**
* Implementation of CloudStorage for AWS S3 Storage
*/
export declare class S3Storage implements CloudStorage {
private s3;
/**
* Initialize new AWS S3 service
*/
constructor();
/**
* Read an object from an S3 bucket
* @param opts Container (bucket) and blob (object) to read from in S3
*/
read(opts: ReadBlobOptions): Promise<Stream>;
/**
* Write an object to an S3 bucket
* @param opts Container (bucket), blob (object) and body to write to S3
*/
write(opts: WriteBlobOptions): Promise<WriteBlobOutput>;
}