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