-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 Event Notificatons #31
Comments
Definitely. Just to clarify, are you currently not receiving any S3 notifications at all? Mine look like this: This is an alert configured through CloudWatch as far as I know. I think S3 publishes some specific messages through SNS without CloudWatch? Let me know what you're currently receiving and what you'd like to receive. If possible, try to get the event data payload (not necessary if you don't know how). |
Hi, so I'm adding an event for a PUT on the bucket so that whenever a certain file or file type is uploaded it sends the notification. I initially tried sending the event straight to the Lambda function, but this didn't send anything, so had it send to SNS and then subscribed the Lambda function to the topic. This worked, but think the formatting needs to be applied. Have added a screenshot of how it looks. It doesn't need to display all the information, just the File Name, the Bucket it was uploaded to, the Event and Timestamp etc. Here is the JSON payload - edited:
|
Fantastic, thank you for all the information. I don't think it's too
difficult to add support.
If you're up for making a PR, it should mostly involve following what's
already sketched out:
- Add event to Slack payload code here: https://github.com/assertible/lambda-cloudwatch-slack/blob/master/index.js#L196
- Add handler here: https://github.com/assertible/lambda-cloudwatch-slack/blob/master/index.js#L386
- Add use configuration here `s3: { match_text: "S3 Notification" }`
- Add you test event to `test/s3-event.json`
- Add test script entry: https://github.com/assertible/lambda-cloudwatch-slack/blob/master/scripts/test.sh
If you don't have time, or don't want to, no worries :). I can probably
add support later this evening or Sunday.
|
Cheers. Struggling a bit with the Slack payload code from the first link, and the parameters that are needed for the S3 event. Will keep trying, but I'm no node expert. |
No worries, thanks for taking a crack at it. If you want to push a PR
with your current progress I can help out.
|
Any possibility of adding in a function to handle S3 Events, e.g. puts or deletes.
The text was updated successfully, but these errors were encountered: