{"repo":"amancevice/yake","free":true,"listed":false,"github":"https://github.com/amancevice/yake","clone":"git clone https://github.com/amancevice/yake.git","description":"A Rake-like DSL for writing AWS Lambda handlers","language":"Ruby","stars":174,"topics":["aws","lambda","dsl","rake","ruby","serverless","datadog","api-gateway"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"λake Write your AWS Lambda function handlers using a Rake-like declarative syntax: You can even declare Sinatra-like API Gateway routes for a main entrypoint: Installation Add this line to your application's Gemfile: And then execute: Or install it yourself as: Why Is It Called \"yake\"? \"λ\" + Rake, but \"λ\" is hard to type and I think \"y\" looks like a funny little upside-down-and-backwards Lambda symbol. Why Use It? So why use yake for your Lambda functions? Event Logging By default, the handler function wraps its block in log lines formatted to match the style of Amazon's native Lambda logs sent to CloudWatch. Each invocation of the handler will log both the input event and the returned value , prefixed with the ID of the request: Logging the request ID in this way makes gathering logs lines for a particular execution in CloudWatch much easier. You can customize or disable the logger: Include Yake::Logger on a class to access this logger: API Routes A common use of Lambda functions is as a proxy for API Gateway. Oftentimes users will deploy a single Lambda function to handle all requests coming from API Gateway. Requiring the yake/api module will add the API-specific DSL into your handler. Define API routes using Sinatra-like syntax Helper methods are also made available to help produce a response for API Gateway: Set a default header for ALL responses: Produce an API Gateway-style response object: Route an event to one of the declared routes: (Near) Zero Dependencies Finally,","default_branch":null,"files":null,"tree":[],"storefront":"/r/amancevice","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/amancevice/yake/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}