Skip to main content

S3Adapter

@h4ad/serverless-adapter > S3Adapter

(class) S3Adapter

The adapter to handle requests from AWS S3.

The option of responseWithErrors is ignored by this adapter and we always call resolver.fail with the error.

Event Reference

Signature:

export declare class S3Adapter extends AwsSimpleAdapter<S3Event> 

Extends: AwsSimpleAdapter <S3Event>

Example

const s3ForwardPath = '/your/route/s3'; // default /s3
const s3ForwardMethod = 'POST'; // default POST
const adapter = new S3Adapter(\{ s3ForwardPath, s3ForwardMethod });

(constructor)

Default constructor

Signature:

constructor(options?: S3AdapterOptions);

Parameters

ParameterTypeDescription
optionsS3AdapterOptions(Optional) The options to customize the SNSAdapter

(method) canHandle

Signature:

canHandle(event: unknown): event is S3Event;

Parameters

ParameterTypeDescription
eventunknown

Returns:

event is S3Event

(method) getAdapterName

Signature:

getAdapterName(): string;

Returns:

string