Skip to content

Instantly share code, notes, and snippets.

@loloDawit
loloDawit / handler.js
Last active February 14, 2024 04:31
Lambda handler functions
require('dotenv').config({ path: './.env' });
const isEmpty = require('lodash.isempty');
const validator = require('validator');
const connectToDatabase = require('./db');
const Note = require('./models/Note');
/**
* Helper function
* @param {*} statusCode
@DavidWells
DavidWells / serverless.yml
Created December 24, 2017 20:56 — forked from jscattergood/serverless.yml
Creating a custom serverless resource for subscribing to SNS topics in another region
# Welcome to Serverless!
#
# Happy Coding!
service: cross-region-sns-subscriber
# Keep environment specific configurations in separate files
custom: ${file(config/${env:STAGE}.json)}
provider:
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active June 7, 2024 05:17
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,