All Projects → ryanblock → lambda-shell-commands

ryanblock / lambda-shell-commands

Licence: Apache-2.0 License
AWS Lambda shell commands in $PATH available to runtime subprocesses

Programming Languages

javascript
184084 projects - #8 most used programming language
arc
50 projects
python
139335 projects - #7 most used programming language
ruby
36898 projects - #4 most used programming language

AWS Lambda shell commands

Last change detected: 2021-09-01T00:56:58.814Z

Shell command lists by Lambda runtime

nodejs10.x

nodejs12.x

nodejs14.x

python3.6

python3.7

python3.8

ruby2.5

ruby2.7

How Lambda works

AWS Lambda is a full Linux microcontainer that boots up on-demand in milliseconds, billing in 1ms increments.

Lambda is primarily used for running whatever business logic you feed one of its supported runtimes (or the custom runtime of your choosing, if you're into that!).

As in any application, it's not unusual to need to shell out for some kinds of operations – after all, UNIX is pretty powerful! 🏋🏽‍♀️

Fortunately, Lambdas – which run a lightweight AWS AMI – come equipped with a full complement of common Linux shell commands. But not everything, hence this project!

Helpful notes

  • AWS pre-installs the AWS SDK in its Lambdas, so don't include it in your application's dependencies!
    • In fact, doing so will only slow down your Lambda's startup times, so don't do that.
  • Important local paths
    • /var/task - Your default cwd (and where your code is located)
    • /tmp - A nice place to perform local operations
  • ⚠️ Security warning: If dealing with any potentially sensitive data on the Lambda filesystem, always be sure to destroy those files before ending each execution.
    • Lambda microcontainers are kept warm and recycled across your invocations. Not cleaning up after temp files leaves open the possibility of leaking data across executions – statelessness is a feature!

Build your own Lambda-based application

Partially self-serving plug: this here project is built with Architect, an open source serverless framework created and maintained by the company I cofounded: Begin, an open source-centric serverless app platform, created to help people like you build the fast, durable, scalable, affordable, maintainable, serverless software of the future.

Credits

This project inspired by What's on Lambda!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].