
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Enough structure to get our Lambda handlers in the air.
Airfoil is curated middleware stack that abstracts away common infrastructure needed for Lambda handler functions.
Add this line to your application's Gemfile:
gem 'airfoil'
And then execute:
bundle install
Or install it yourself as:
gem install airfoil
You can instantiate a new handler with an Airfoil stack like so:
require_relative "config/environment"
STACK = Airfoil.create_stack do |b|
# Custom middleware and handlers go here
b.use Airfoil::Middleware::FunctionName, DbReset, "db-reset"
b.use Airfoil::Middleware::FunctionName, UpdateUpcomingRenewals, "update-upcoming-renewals"
end
def handler(event:, context:)
STACK.call({event: event, context: context})
end
Airfoil also includes a stack of middleware that you can add to or customize to suit your specific needs. Your own middleware can inherit from the base class and implement their own behavior like so:
class MyResolverMiddleware < Airfoil::Middleware::Base
def call(env)
ApplicationResolver.handle(env[:event], env[:context])
end
end
Existing middleware include:
FunctionName
- dispatch any calls made to a specific Lambda function (by name) to a specified handler classLogEvent
- log AWS events in a pretty formatSetRequestId
- set the AWS_REQUEST_ID
environment variable for your function codeThere are additional middleware available as separate gems that provide specific functionality. They must be explicitly added to your middleware stack in create_stack
.
Add the airfoil-sentry
gem to your Gemfile.This provides three middlewares:
SentryCatcher
- catch exceptions and report them to Sentry, including context:b.use Airfoil::Middleware::SentryCatcher
SentryMonitoring
- instrument your function code for Sentry's performance monitoringb.use Airfoil::Middleware::SentryMonitoring
Add the airfoil-activerecord
gem to your Gemfile. This provides a single middleware:
DatabaseConnection
- Check a connection in/out and enable the query cache per handlerb.use Airfoil::Middleware::DatabaseConnection
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
FAQs
Unknown package
We found that airfoil demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.