Socket
Socket
Sign inDemoInstall

is-lambda

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-lambda

Detect if your code is running on an AWS Lambda server


Version published
Maintainers
1
Weekly downloads
9,763,773
decreased by-6.12%

Weekly downloads

Package description

What is is-lambda?

The is-lambda npm package is designed to help developers determine if their code is running in an AWS Lambda environment. This can be particularly useful for writing code that needs to behave differently when run in a Lambda function versus other environments, such as on a local development machine or a different cloud platform. The package provides a simple interface to check the execution environment.

What are is-lambda's main functionalities?

Check if running in AWS Lambda

This feature allows developers to programmatically determine if their code is executing within an AWS Lambda environment. The code sample demonstrates how to use the is-lambda package to check the environment and print a message accordingly.

const isLambda = require('is-lambda');

if (isLambda) {
  console.log('Running in AWS Lambda');
} else {
  console.log('Not running in AWS Lambda');
}

Other packages similar to is-lambda

Readme

Source

is-lambda

Returns true if the current environment is an AWS Lambda server.

Build status js-standard-style

Installation

npm install is-lambda

Usage

var isLambda = require('is-lambda')

if (isLambda) {
  console.log('The code is running on a AWS Lambda')
}

License

MIT

Keywords

FAQs

Last updated on 24 May 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc