Coder Social home page Coder Social logo

serverless-workshop's Introduction

Serverless Workshop

Welcome to the workshop. This repo will guide us through our serverless journey.

Using this repo

Work from the lessons folders.

If you need help, look in the lessons-code-complete directory for the completed code.

|- lessons (work from these)
|- lessons-code-complete (answers if you need to see them)

Table of Contents

Workshop Lessons

Lesson Final Code
1 Http Hello World
Deploying Your First Endpoint
Complete Code
2 Http Dynamic Content
Dynamic Content in Functions
Complete Code
3 Http Post With Cors
Deploying an http POST endpoint with CORS support
Complete Code
4 Using Env Vars
Using environment variables
Complete Code
5 Using Serverless Variable Syntax
Using Serverless variable syntax
Complete Code
6 Using Addition Resources
Defining additional resources
Complete Code
7 Using Serverless Plugins
Extending Serverless Functionality with plugins
Complete Code
8 Using Multiple Stages
Deploying to Multiple Stages
Complete Code
Dynamodb Streams
Defining additional resources
Complete Code
Kinesis Basic
Simple Kinesis Example
Complete Code
Kinesis
Using Kinesis as an Event Source
Complete Code
S3
Triggering Lambda functions from s3 events
Complete Code
Schedule
Triggering functions via cron schedules
Complete Code
Sns
Using AWS SNS as event source
Complete Code
Sns Advanced
Using External SNS Topics Example
Complete Code
Sns Basic
Basic SNS Example
Complete Code
Step Functions
Using AWS Step Functions
Complete Code

Helpful Tools

Prerequisites & Setup Steps

  1. **Install the latest LTS version of **Node. How to install Node.
  2. Install git version control.
  3. **Setup a AWS account (if you don't already have one). **You can setup a free account here: setup free AWS account. It's recommended to not use pre-existing AWS account running production code.
  4. **Install serverless CLI **by running npm install serverless -g on the command line. 
  5. Run serverless --help in your terminal to validate the Serverless CLI works on your machine.
  6. Then connect the serverless framework with your AWS credentialsSee the docs or watch the video

Troubleshooting & FAQ

  • Y A M L Exception? check your yaml indentation syntax. yaml validator | yaml validator two

  • Unable to import module 'handler': Error at Function.Module._resolveFilename (module.js:469:15)

    This error means lambda can't find your included node_modules. Make sure you npm install in your project and install all your dependancies locally before running sls deploy

  • Unable to delete bucket error. Your s3 bucket in question might have files in it. You will need to head into AWS cloudformation in the console and manually delete the stack.

  • Stack [xyz] cannot be deleted while in status UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS This happens when cloudformation gets stuck in a weird state. You might need to log into the AWS console, head into cloudformation and delete the stack from the UI

serverless-workshop's People

Contributors

davidwells avatar vladistan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.