@shelf/aws-sns-message-attributes
v2.0.0
Published
Transform JSON into AWS SNS message attributes format
Downloads
22,346
Maintainers
Readme
aws-sns-message-attributes
Transform JSON into AWS SNS message attributes format. See 1, 2
Install
$ yarn add @shelf/aws-sns-message-attributes
Usage
const {transformMessageAttributes} = require('@shelf/aws-sns-message-attributes');
transformMessageAttributes({
string: 'hello',
array: ['hello', 'world'],
number: 1,
bool: true,
});
/*
{
string: {DataType: 'String', StringValue: 'hello'},
array: {DataType: 'String.Array', StringValue: '["hello","world"]'},
number: {DataType: 'Number', StringValue: 1},
bool: {DataType: 'String', StringValue: 'true'},
}
*/
Note: This library does not support binary values
Publish
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags
License
MIT © Shelf