News for hackers. Stuff that matters.
Re:Writing Cloud Functions by viraptor on Wednesday February 10, 2016 @03:43AM (#11071448)
My biggest issue is that (unless I'm missing something obvious), there's no way to add any configuration to the lambda. If I want different queues to do (slightly) different things, then I either need different code upload for each of them, or the parameter to be sent on the queue.

I could not find any place where I can tell it - this is the code, this lambda uses it with N=5, that lambda uses it with N=42.

Re:Writing Cloud Functions by glenjamin on Wednesday February 10, 2016 @03:59AM (#11071507)
I've spoken to an Amazon rep about this.

The best approaches they were able to suggest were:

  * Lookup config from dynamo db when the lambda runs
  * Lookup config from S3 when the lambda runs
  * Bake config into the artifacts
You can read the name of the alias you're currently running as from the context data, and use this as a key into some external system.

Not ideal.

Re:Writing Cloud Functions by twagner on Wednesday February 10, 2016 @08:01AM (#11072414)
Suboptimal ;-). This is a common request, and we're looking at options for a config feature that's independent of the code payload. Tweet or email me detailed suggestions/asks for it: @timallenwagner or timwagne at amazon.com.
Re:Writing Cloud Functions by viraptor on Wednesday February 10, 2016 @05:54PM (#11076844)
Why not inject it to `context` parameter in some variable with known name? As long as the field is exposed to CF and in the panel, it should be all we need.
Re:Writing Cloud Functions by encoderer on Wednesday February 10, 2016 @11:37AM (#11073884)
I struggled with this a bit at first. I moved all my config into my payload, which pleased me a lot, but only really works in the use case where Lambda is being triggered by a queue/topic message or by your direct invocation.