claudiajs / claudia

Deploy Node.js projects to AWS Lambda and API Gateway easily
https://claudiajs.com
MIT License
3.8k stars 274 forks source link

Get RequestId #52

Closed daarond closed 8 years ago

daarond commented 8 years ago

Easy question: I'm trying to get the current RequestId that corresponds to CloudWatch logging.

Cheers, Daaron

gojko commented 8 years ago

if you're not using the api builder, just get it from the lambda context object. if you're using the API builder, there's no direct way to do that now, but I can add it.

daarond commented 8 years ago

Hi Gojko, I'm trying to use the API builder, so I would appreciate the addition. Thanks for all your work on the project!

A few more feature requests: On Windows 10, the package.json-indicated path doesn't recurse and my resulting set of files is about 9MB. It would be great if it could recurse and package up to s3. I'm doing it by hand that way now, but it would be great if claudia could do it. I'd be happy to pitch in if you could provide some suggestions about where you think it should go and how it should be structured.

Cheers, Daaron

On Sun, Jun 19, 2016 at 1:27 AM Gojko Adzic notifications@github.com wrote:

if you're not using the api builder, just get it from the lambda context object http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html. if you're using the API builder, there's no direct way to do that now, but I can add it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/claudiajs/claudia/issues/52#issuecomment-226981987, or mute the thread https://github.com/notifications/unsubscribe/AAi-ANtrziTbfxKJ843q9vx6vztmb5mQks5qNOFAgaJpZM4I5GRg .

gojko commented 8 years ago

Hi,

I just published claudia-api-builder 1.3.0, that exposes the lambda context. Check out the Web Api Lambda Context example project to see it in action.

Regarding the file recursion, I'm not sure I understand the problem. In general, claudia follows standard NPM packaging rules -- excludes stuff from .gitignore etc and if the files property is set in package.json, it should copy and include that. If that's not what is happening, please open another issue with the details of your package.json and what is not being packaged correctly, so we can deal with that.