Doing serverless with Terraform

Serverless Application & Infrastructure Lifecycle Management using Terraform and friends!

Give it a star on GitHub, please!

What is serverless.tf?

serverless.tf is an opinionated open-source framework for developing, building, deploying, and securing serverless applications and infrastructures on AWS using Terraform.

It is an organic response to the accidental complexity of many existing tools used by serverless developers.

100% open-source
Simplifying serverless for all

How serverless.tf is different?

1. There are too many similar tools

Developers and DevOps/Cloud engineers have to deal with several types of tools:

  1. Serverless application frameworks (Serverless Framework, AWS Chalice, Zappa)
  2. Infrastructure management (Terraform, AWS CloudFormation)
  3. Application deployment (Shell scripts, Makefile, AWS CodeDeploy, AWS CLI)

⭐️ serverless.tf approach

Use Terraform for comprehensive infrastructure management and serverless application deployments.


2. Different infrastructure resource scopes

Developers and DevOps/Cloud engineers manage different infrastructure resources differently.

For example, serverless resources (API Gateways, AWS Lambda functions) are managed as part of the Serverless application framework but use infrastructure management tools for traditional Cloud resources (VPC, IAM roles, S3 buckets).

⭐️ serverless.tf approach

Use a single tool created to manage infrastructure as code – Terraform – for all your infrastructure resources.


3. Rather slow application development lifecycle

Developers like to have control of their environment as code. They also prefer running integration tests often before lengthy deployment cycles kick-off.

⭐️ serverless.tf approach

Have all infrastructure resources described as configuration files. This allows developers to spin up and tear down complete environments required for their work easily.

Having interaction with real services is often slower than running everything locally (e.g., using LocalStack), but interaction with real services gives the most accurate feedback regarding how AWS services work.


4. Lack of high-quality reusable components

Some of the existing solutions support plugins that extend the functionality of the framework and to simplify the usage of infrastructure services.

In reality, developers often have to dive into those to learn internals and archive what they need. Adding functionality to those plugins usually requires writing code in Javascript.

⭐️ serverless.tf approach

By relying on open-source Terraform AWS modules that have been developed over several years by Betajob in partnership with our huge community, you get to build your serverless project on top of verified, reusable components.

FAQ

Why not just use the Serverless Framework?

The challenges listed above apply to the Serverless Framework, too. In particular, one of the biggest challenges is infrastructure fragmentation between CloudFormation and Terraform.

What is the supported workflow?

serverless.tf does not restrict you from setting up your CI/CD workflow, which suits your needs, but it gives you the ways to control building, testing, deployments steps as code.

What runtimes are supported?

All of them, because serverless.tf does not restrict you there, but it gives you a way to build, package, and deploy your code in a standardized way.

Who is using this?

Terraform AWS modules are used by thousands of companies worldwide. There were more than 200 million provisions from the Terraform Registry.

What platforms are supported?

AWS only.

Can I have commercial support for my Terraform and serverless project?

Yes, please reach out to Betajob.

Supported AWS Serverless Platform Services

See AWS Serverless official homepage for more information about each service, and Terraform AWS Modules for other compatible solutions.

AWS Lambda

AWS Lambda lets you run code without provisioning or managing servers.

Repository | Examples

Lambda@Edge

Lambda@Edge allows you to run Lambda functions at AWS Edge locations in response to Amazon CloudFront events.

Repository | Examples

AWS AppSync

AWS AppSync simplifies application development by letting you create a flexible GraphQL API to securely access, manipulate, and combine data from one or more data sources.

Repository | Examples

Amazon EventBridge

Amazon EventBridge is a serverless event bus that makes it easier to build event-driven applications at scale using events generated from your applications, integrated SaaS applications, and AWS services.

Repository | Examples

AWS Step Functions

AWS Step Functions is a serverless function orchestrator that makes it easy to sequence AWS Lambda functions and multiple AWS services into business-critical applications.

Repository | Examples

Amazon CloudFront

Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment.

Repository | Examples

Amazon API Gateway - HTTP/WebSocket

Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.

Repository | Examples

Amazon DynamoDB

Amazon DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale.

Repository | Examples

Amazon Aurora Serverless

Amazon Aurora Serverless is an on-demand, auto-scaling configuration for Amazon Aurora (MySQL-compatible edition), where the database will automatically start up, shut down, and scale capacity up or down based on your application's needs.

Repository | Examples

Amazon RDS Proxy

Amazon RDS Proxy is a fully managed, highly available database proxy for Amazon Relational Database Service (RDS) that makes applications more scalable, more resilient to database failures, and more secure.

Repository | Examples

Amazon S3

Amazon Simple Storage Service (Amazon S3) provides developers and IT teams with secure, durable, highly-scalable object storage.

Repository | Examples

Amazon SNS

Amazon SNS is a fully managed pub/sub messaging service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.

Repository | Examples

Amazon CloudWatch

Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS.

Repository | Examples

Amazon SQS

Amazon SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.

Repository | Examples

AWS CodeDeploy

AWS CodeDeploy is a service that automates application deployments to a variety of compute services including Amazon EC2, AWS Lambda, and instances running on-premises.

Repository | Examples

AWS AppConfig

AppConfig, a capability of AWS Systems Manager, to create, manage, and quickly deploy application configurations.

Repository | Examples

NEW!    AWS SSM Parameter Store

Parameter Store, a capability of AWS Systems Manager, provides secure, hierarchical storage for configuration data management and secrets management.

Repository | Examples

NEW!    AWS Secrets Manager

AWS Secrets Manager helps you manage, retrieve, and rotate database credentials, API keys, and other secrets throughout their lifecycles.

Repository | Examples