
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@awsless/lambda
Advanced tools
- Rename ViewableError to ExpectedError - Think of ways to type errors (TypeScript might need to figure this out first.)
import { lambda } from "@awsless/lambda";
// simple echo function
export default lambda({
handle(event) {
return event
}
})
import { lambda } from "@awsless/lambda";
import { object, string } from "@awsless/validate";
import { bugsnag } from "@awsless/bugsnag";
export default lambda({
// Validate the input
schema: object({
message: string()
}),
// Log errors to bugsnag
logger: bugsnag(),
handle({ message }) {
return message
}
})
import { lambda, invoke } from "@awsless/lambda";
import { string } from "@awsless/validate";
export const echo = lambda({
schema: string(),
handle(value) {
return value
}
})
export default lambda({
handle() {
// Providing the type definition of the lambda you want to invoke will give you type hinting for the payload and return value.
return invoke<typeof echo>({
name: 'echo',
payload: 'Hi'
})
}
})
import { mockLambda } from "@awsless/lambda";
const lambdas = mockLambda({
echo: a => a,
})
it('your test', async () => {
const result = await invoke({
name: 'echo',
payload: 'Hi'
})
expect(result).toBe('Hi')
expect(lambdas.echo).toBeCalled()
})
FAQs
- Rename ViewableError to ExpectedError - Think of ways to type errors (TypeScript might need to figure this out first.)
The npm package @awsless/lambda receives a total of 170 weekly downloads. As such, @awsless/lambda popularity was classified as not popular.
We found that @awsless/lambda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.