Manage AWS Lambda functions with Terraform

Learn the best practices for managing serverless functions with Terraform

Over the years, AWS Lambda added support for ever finer control of how the functions work. That resulted in more than 2 dozen configuration options and that makes it hard to see what is important and what is just for a specific use-case. And even for seemingly straightforward ones there are usually not-so-obvious consequences.

What you’ll learn

  • Configure Lambda functions confidently.
  • Use Terraform with Lambda.
  • Gain a deeper understanding on how AWS Lambda works.

Course Content

  • Terraform basics –> 1 lecture • 22min.
  • Required arguments –> 5 lectures • 31min.
  • Optional settings –> 5 lectures • 32min.
  • Miscellaneous –> 2 lectures • 12min.

Manage AWS Lambda functions with Terraform

Requirements

Over the years, AWS Lambda added support for ever finer control of how the functions work. That resulted in more than 2 dozen configuration options and that makes it hard to see what is important and what is just for a specific use-case. And even for seemingly straightforward ones there are usually not-so-obvious consequences.

For example, deploying a Lambda function and removing it by default leaves all its logs stored in CloudWatch Logs forever. Or memory setting is tied to CPU so adding more RAM also makes the function run faster even if it does not use it at all.

This course is a systematic view on how to best deploy and configure Lambda functions with Terraform. You’ll learn about the important arguments and the best practices for each of them and a detailed discussion of what they change.

What you’ll learn in this course

We’ll start with a quick introduction to Terraform and how to set it up with AWS. Then we’ll look into one argument at a time and see what it does.

  • Install and configure Terraform for AWS
  • Basics of a tf file
  • Required arguments (code, name, handler, runtime, role)
  • Optional arguments (log group, environment variables, memory, timeout, reserved concurrency)
  • Integrate external programs with Terraform (for example, npm install)
  • Lambda attributes
Get Tutorial