Skip to content

Comments

Event source mapping support#189

Merged
DeviaVir merged 1 commit intomotdotla:masterfrom
starlightslo:event-source-mapping
Mar 27, 2017
Merged

Event source mapping support#189
DeviaVir merged 1 commit intomotdotla:masterfrom
starlightslo:event-source-mapping

Conversation

@starlightslo
Copy link
Contributor

I created a new JSON file (event_sources.json) for event source mapping feature and added a new option (-S) on deploy command for a specific event source mapping file.

[
    {
        "EventSourceArn": "your event source arn",
        "StartingPosition": "LATEST",
        "BatchSize": 100,
        "Enabled": true
    }
]

This commit not only provides create event source mapping but also can according to the existing event sources to update or delete. If you think this commit is good, please help me to merge or let me know how can I improve it. Thanks.

@starlightslo starlightslo changed the title Added event source mapping feature. Event source mapping support Feb 11, 2017
Copy link
Collaborator

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good! I will do some more testing before merging, thank you for your contribution and your patience with this PR 👍

@DeviaVir DeviaVir merged commit e34799e into motdotla:master Mar 27, 2017
@DeviaVir DeviaVir mentioned this pull request Mar 27, 2017
@DeviaVir
Copy link
Collaborator

This change is now live and published to NPM as 0.8.14.

@liammclennan
Copy link

This is a breaking change. I updated my version of node-lambda and deploy now crashes with

Error: ENOENT: no such file or directory, open 'event_sources.json'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.readFileSync (/home/liam/work/sas/gecko-integration/node_modules/jsonfile/index.js:66:20)
    at Lambda._eventSourceList (/home/liam/work/sas/gecko-integration/node_modules/node-lambda/lib/main.js:141:28)
    at /home/liam/work/sas/gecko-integration/node_modules/node-lambda/lib/main.js:561:33
    at /home/liam/work/sas/gecko-integration/node_modules/node-lambda/lib/main.js:273:5
    at ChildProcess.exithandler (child_process.js:197:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)

during the step => Reading event source file to memory

@abetomo
Copy link
Contributor

abetomo commented Mar 28, 2017

It seems necessary to run node-lambda setup and create event_sources.json.
It opened PR(#205) which does not cause an error even if event_sources.json does not exist as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants