Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@effect-aws/lambda
Advanced tools
Clean way to write AWS Lambda handlers using [Effect](https://www.effect.website/).
Clean way to write AWS Lambda handlers using Effect.
It provides a makeLambda
function that takes an EffectHandler
and returns a native promise Lambda handler function.
The implementation supports defining global runtime layer with graceful shutdown. So all finalizers defined by acquireRelease
will be called on lambda downscaling.
npm install --save @effect-aws/lambda
Without dependencies:
import type { SNSEvent } from "aws-lambda";
import { Effect } from "effect";
import { EffectHandler, makeLambda } from "@effect-aws/lambda";
// Define your effect handler
const myEffectHandler: EffectHandler<SNSEvent, never> = (event, context) => {
// Your effect logic here
return Effect.succeed("Hello, World!");
};
// Create the Lambda handler
export const handler = makeLambda(myEffectHandler);
With dependencies:
import { EffectHandler, makeLambda } from "@effect-aws/lambda";
import * as Logger from "@effect-aws/powertools-logger";
import type { SNSEvent } from "aws-lambda";
import { Context, Effect, Layer } from "effect";
interface FooService {
bar: () => Effect.Effect<never, never, void>;
}
const FooService = Context.Tag<FooService>();
const FooServiceLive = Layer.succeed(
FooService,
FooService.of({ bar: () => Logger.logInfo("Not implemented") }),
);
// Define your effect handler with dependencies
const myEffectHandler: EffectHandler<SNSEvent, FooService> = (event, context) =>
Effect.gen(function* (_) {
yield* _(Logger.logInfo("Received event", { event, context }));
const service = yield* _(FooService);
return yield* _(service.bar());
});
// Create the global layer
const LambdaLive = Layer.provideMerge(
FooServiceLive,
Logger.DefaultPowerToolsLoggerLayer,
);
// Create the Lambda handler
export const handler = makeLambda(myEffectHandler, LambdaLive);
FAQs
Clean way to write AWS Lambda handlers using [Effect](https://www.effect.website/).
The npm package @effect-aws/lambda receives a total of 36,794 weekly downloads. As such, @effect-aws/lambda popularity was classified as popular.
We found that @effect-aws/lambda 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.