Skip to content

danieljhkim/Multi-Purpose-Serverless-Lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Purpose-Serverless-Lambda

This serverless lambda is designed to be used for multiple utilizations across multiple applications and services. This lambda has access to various AWS resources and has an interface for cross-platform operations. It is deployed as AWS Lambda and exposed via API Gateway.

Features:

  • AWS DynamoDB Client Interface
    • Query Operations
    • Put operations
  • AWS S3 Client Interface
    • Get operations
    • Put operations
  • AWS SNS Client Interface
    • Invoke operations
  • Error auditing to S3 Bucket for critical operations

How to Use

Local Setup

$ npm install
$ node express-app

Invoke a Service (POST request)

## sample request body:

{
  "event": {
    "body": {
      "action": "WRITE_COINS_HOURLY_TO_DB",
      "days": 10
    }
  }
}
{
  "event": {
    "body": {
      "action": "GET_COINS_DB",
      "table": "coin-hourly",
      "coin": "eos",
      "start": 1659982050380,
      "end": 1660104217178
    }
  }
}