bragg-s3
bragg middleware to process s3 triggers
Install
$ npm install bragg-s3
Routing
The routing is decided based on the event type
Event name | Method |
---|---|
ObjectCreated:* | post |
ObjectCreated:Put | post |
ObjectCreated:Post | post |
ObjectCreated:Copy | post |
ObjectCreated:CompleteMultipartUpload | post |
ObjectRemoved:* | delete |
ObjectRemoved:Delete | delete |
ObjectRemoved:DeleteMarkerCreated | delete |
ObjectRestore:Post | post |
ObjectRestore:Completed | post |
ReducedRedundancyLostObject | post |
Usage
const app = ;const router = ;const s3 = ; // Listen for events in the `TopicName` topicrouter; app;app; exportshandler = app;
The s3:
prefix is added before the name of the S3 trigger. The bucket
, key
and eventName
are provided in the body
of the request
object. Routing is decided by the configurationId
provided in the request. This can be a UUID when the trigger is created using AWS CloudFormation.
API
braggS3()
Add the bragg S3 middleware to the middleware pipeline.
License
MIT © Simon