@fgiova/mini-sns-client
v1.3.0
Published
[](https://www.npmjs.com/package/@fgiova/mini-sns-client)  [;
await client.publishMessage({
TopicArn: "arn:aws:sns:eu-central-1:000000000000:test",
Message: "Hello World!",
MessageAttributes: {
"my-attribute": {
DataType: "String",
StringValue: "my-value"
}
}
});
await client.publishMessageBatch({
TopicArn: "arn:aws:sns:eu-central-1:000000000000:test",
PublishBatchRequestEntries: [
{
Id: "31afb534-e25e-5812-a92f-e8ff0921f9dd",
Message: "Hello World!",
MessageAttributes: {
"my-attribute": {
DataType: "String",
StringValue: "my-value"
}
}
},
{
Id: "85565b18-6ad4-5ba5-89b2-06d381ab1a6a",
Message: "Hello World! Again",
}
]
});
API
MiniSNSClient(region: string, endpoint?: string, undiciOptions?: Pool.Options, signer?: Signer | SignerOptions)
MiniSNSClient.publishMessage(message: PublishMessage): Promise<PublishMessageResult>
MiniSNSClient.publishMessageBatch(messages: PublishBatchMessage): Promise<PublishMessageBatchResult>
MiniSNSClient.destroy(signer: boolean): Promise<boolean> // signer destroyer default trueAll types are defined in schemas.ts and are derived from the AWS SNS API The main difference is that batch operations are not limited to 10 items, but accept any number of items and provide for running the batches needed to exhaust the total number of items.
License
Licensed under MIT.
