gebn / pushover-notification Goto Github PK
View Code? Open in Web Editor NEWAn AWS Lambda function that sends SNS messages via Pushover
License: MIT License
An AWS Lambda function that sends SNS messages via Pushover
License: MIT License
If we receive a event where the Message
fails to parse as JSON, set it as the message body, with the title set to the Subject
. You can also configure the notification time to Timestamp
.
This would allow you to handle budget notifications without writing another Lambda function to convert from one JSON format to another:
{
'Records': [
{
'EventSource': 'aws:sns',
'EventVersion': '1.0',
'EventSubscriptionArn': 'arn:aws:sns:us-east-1:158438328645:PushNotification:ef4796b2-a0d6-4d3b-b9ff-9866ffe34763',
'Sns': {
'Type': 'Notification',
'MessageId': '4c99e09d-0bdc-52d1-a395-...',
'TopicArn': 'arn:aws:sns:us-east-1:...:PushNotification',
'Subject': 'Budget Notification: Monthly AWS Budget is in Alarm State',
'Message': 'AWS Budget Notification\n\nDear AWS Customer,\n\n...',
'Timestamp': '2017-09-01T02:10:35.610Z'
}
}
]
}
Exiting with the number of failed messages is inadequate - Lambda will believe the function succeeded, and they will not be retried.
Records
key does not exist for every type of event the function can receiveEventSource == 'aws:sns'
for every record (sample)record['Sns']['MessageId']
Due to this questionable behaviour, a new version will only be published if the function is updated. It's therefore possible for a non-tagged push to master after a release to break prod.
Have it email if sending fails. DLQs for all other functions should be consumed by this function so alerts go via Pushover.
Faster than chump
.
Print it as JSON with indentation, so it's easier to read in CloudWatch.
Regions are meant to be self-contained - there shouldn't be inter-region communication except for replication/backup. Therefore deployment to a list of regions needs to be supported, with the ability to keep the latest version in sync. It should be no harder than deploying to a single region.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.