Skip to main content

DynamoDBAdapter

@h4ad/serverless-adapter > DynamoDBAdapter

(class) DynamoDBAdapter

The adapter to handle requests from AWS DynamoDB.

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

Event Reference

Signature:

export declare class DynamoDBAdapter extends AwsSimpleAdapter<DynamoDBStreamEvent> 

Extends: AwsSimpleAdapter <DynamoDBStreamEvent>

Example

const dynamoDBForwardPath = '/your/route/dynamo'; // default /dynamo
const dynamoDBForwardMethod = 'POST'; // default POST
const adapter = new DynamoDBAdapter(\{ dynamoDBForwardPath, dynamoDBForwardMethod });

(constructor)

Default constructor

Signature:

constructor(options?: DynamoDBAdapterOptions);

Parameters

ParameterTypeDescription
optionsDynamoDBAdapterOptions(Optional) The options to customize the DynamoDBAdapter

(method) canHandle

Signature:

canHandle(event: unknown): event is DynamoDBStreamEvent;

Parameters

ParameterTypeDescription
eventunknown

Returns:

event is DynamoDBStreamEvent

(method) getAdapterName

Signature:

getAdapterName(): string;

Returns:

string