Appendix D. Lambda insider

 

This appendix covers

  • Execution environment
  • Lambda’s limitations
  • Older runtimes

Chapter 6 focuses on AWS Lambda, but it’s a rather vast topic, so we had to omit some things. This appendix covers information not included in chapter 6, such as information about Lambda’s execution environment, inherent limitations, and older runtimes.

D.1. Execution environment

At the time we wrote this appendix, Lambda ran on Amazon Linux with kernel version 4.1.17-22.30.amzn1.x86-24. If you’re like us, you might be interested in peeking under the hood and exploring the environment that Lambda has to offer. Luckily, we can get a bit of understanding of what’s under the covers by running shell commands. To try this yourself, do the following:

  1. Open the Lambda console, and click Create a Lambda Function.
  2. In the Blueprint Selection screen, type node-exec. That should filter the available blueprint functions to just one function named node-exec.
  3. Click the node-exec function.
  4. Click Next on the Configure Triggers screen.
  5. Give your new function a name (for example, run-command).
  6. In the Role section, select an existing role or create a new one. Your function will not interact with other AWS resources, so it can take on a basic role.
  7. Click the Next button and then click Create Function.

You can now run this function and pass in commands you want the function to execute:

D.2. Limitations

D.3. Working with older runtimes