awslabs / aws-apigateway-lambda-authorizer-blueprints

Blueprints and examples for Lambda-based custom Authorizers for use in API Gateway.
Apache License 2.0
704 stars 363 forks source link

Update nodejs example to ES7 and Node v8.10 runtime #24

Open jonrhall opened 5 years ago

jonrhall commented 5 years ago

Hi there, I'm a fellow Amazon developer, I'm wondering if you're open to pull requests to update the nodejs example to modern JavaScript? I just spent a few hours completing a ES7 rewrite of the module that's supported in the Node.js v8.10 runtime. I feel like it may better lay out some of the core concepts this example library is trying to convey, and update some of the functional foundations around syntax like let and const as well as arrow functions and other JS features that ES7 and AWS Lambda now support.

If you are, just let me know and I'll put a PR up. Cheers

aro1976 commented 5 years ago

I'm very interested in this, would you share your repo to take a look?

jonrhall commented 5 years ago

Here's a gist of the changes: https://gist.github.com/jonrhall/a8a79a39753195f4e2c35d13d777d71d

feinstein commented 5 years ago

@jonrhall if you find any bugs on your code in the future, please share it in here so we can fix it as well, thanks!