Skip to content

A simple example of an api endpoint build on AWS, using Lambda, API Gateway and S3.

Notifications You must be signed in to change notification settings

pasor1/flyers-gallery-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Framework Node REST API on AWS

Example of an api endpoint build on AWS, using Lambda, API Gateway and S3. The Lambda function read a stream from a .csv file on S3, transform it in JSON and finally output it.

Usage and Query string parameters

curl https://xxxxxxxxx.execute-api.eu-south-1.amazonaws.com/api/flyers?page=1&limit=20&expired=0&notpublished=0
  • limit (int > 0, default 100) | Row limit
  • page (int > 0, default 1) | Page, based on limit setting
  • expired (0 or 1, default 0) | ouput expired (end_date < now) records also
  • notpublished (0 or 1, default 0) | ouput notpublished (is_published = 0) records also

Setup

Install dependencies: npm install

Deploy

You need an AWS account.

Install and configure Serverless Framwork:

Set you preferred AWS region in "serverless.yml" (default eu-south-1)

Deploy on AWS sls deploy

Remove

Remove from your AWS account: sls remove

About

A simple example of an api endpoint build on AWS, using Lambda, API Gateway and S3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published