New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

serverless-bash-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-bash-plugin

A Serverless Framework plugin that allows writing Lambdas in Bash.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

serverless-bash-plugin

A Serverless Framework plugin that allows writing Lambdas in Bash.

What can it do? Run any CLI tools including AWS CLI (see s3-access in the example directory) that could be packaged into layer.

Usage

Installation

  • Install plugin
npm install --save-dev serverless-bash-plugin

or

yarn add --dev serverless-bash-plugin
  • Add plugin to your serverless.yml
plugins:
  - serverless-bash-plugin

Adding your lambdas

Add a function to the functions section of your serverless.yml file

functions:
  echo:
    handler: src/echo.sh
    runtime: provided.al2

The plugin will detect lambda handlers ending in .sh extension.

Example echo handler:

handler () {
  response=$1
}

The generated Bash script will call handler function and pass the request body as a first parameter, also available as variable request. Set the response string to the response variable.

Check a full service in the example directory.

Keywords

serverless

FAQs

Package last updated on 25 Oct 2022

Did you know?

Socket

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