Search⌘ K
AI Features

Create First Serverless Stack

Discover how to create a basic serverless stack by defining Lambda functions in TypeScript, configuring the serverless.yml file, and linking your function to API Gateway. This lesson guides you through deploying and testing your first serverless application using AWS and Serverless Framework.

We'll cover the following...

Previously, we learned the anatomy of a template of the serverless.yml file of the Serverless Framework and its basic commands. We also managed to generate a dummy project from the available templates. In this lesson, we'll work on generating what we want ourselves, and we'll learn in practice how to do it. We'll create a simple project using the Serverless Framework. In that project, we'll create a Lambda function in TS and then link this to the API Gateway so that our Lambda can be called an API.

Below, we can see the project, opened on the serverless.yml file; please click “Run.” This will prepare the environment for us to work in. ...

service: my-first-serverless-project

provider:
  name: aws
  runtime: nodejs18.x
  stage: dev
  region: us-east-1

plugins:
  - serverless-esbuild
Serverless project with terminal

This serverless.yml template file serves as a starting ...