SQSAdapter
@h4ad/serverless-adapter > SQSAdapter
(class) SQSAdapter
The adapter to handle requests from AWS SQS.
The option of responseWithErrors
is ignored by this adapter and we always call resolver.fail
with the error.
Signature:
export declare class SQSAdapter extends AwsSimpleAdapter<SQSEvent>
Extends: AwsSimpleAdapter <SQSEvent>
Example
const sqsForwardPath = '/your/route/sqs'; // default /sqs
const sqsForwardMethod = 'POST'; // default POST
const adapter = new SQSAdapter(\{ sqsForwardPath, sqsForwardMethod });
(constructor)
Default constructor
Signature:
constructor(options?: SQSAdapterOptions);
Parameters
Parameter | Type | Description |
---|---|---|
options | (Optional) The options to customize the SNSAdapter |
(method) canHandle
Signature:
canHandle(event: unknown): event is SQSEvent;
Parameters
Parameter | Type | Description |
---|---|---|
event | unknown |
Returns:
event is SQSEvent
(method) getAdapterName
Signature:
getAdapterName(): string;
Returns:
string