Looking for a reusable template to start your serverless framework journey in AWS? You've come to the right place.
Goals
- Get familiar with the serverless-framework syntax todo-api serverless.yml
- How to manage a monorepo, with a shared common values file
- Start working with AWS Lambda Layers instead of attaching dependencies to your Lambda Functions
- Deep dive into the Lambda Layers structure, in both Python and NodeJs
- Modify the repository with your own code, build and deploy!
- Using serverless framework plugins
- Concepts, use cases, and project's structure - Theory
Repository
unfor19 / serverless-template
Boilerplate template for the serverless-framework
serverless-template
Boilerplate template for the serverless-framework.
Want to learn how to get start with the serverless framework? Watch my YouTube video where I explain about how to use the framework, while using this GitHub repository.
Requirements
-
AWS account
Getting Started
Goal
Deploy two serverless services (APIs)
- todo-api - NodeJS 12.x (JavaScript/TypeScript)
- CRUD app - To keep it simple, we're using an S3 bucket as a database. The contents are saved to the objects' user-defined metadata
- greet-api - Python 3.8
- Send a name and get a greeting
Both services have dependencies, and we'll use Lambda Layers to meet these dependencies.
-
Clone this repository (or Use as template and then clone)
$ (home) git clone https://github.com/unfor19/serverless-template.git
-
Use this Docker image
Image Usage Examples
-
With aws-vault
$ (serverless-template) aws-vault exec PROFILE_NAME -- bash ./scripts/docker_run.sh
-
AWS Environment variables
$ (serverless-template) export AWS_SECRET_ACCESS_KEY=A123123 $ (serverless-template) export AWS_ACCESS_KEY_ID=B1232123123 $ (serverless-template) export AWS_REGION=eu-west-1 $ (serverless-template) export
…
-
Top comments (0)