AWS Simple API

Deploy master branch codecov

A simple AWS Lambda with Go

Note: The valid rules for defining Model and device identifiers are:

  • It should start with id.
  • It should end with digits.
  • It should be a single word, the white spaces are not allowed.

example : id23

AWS Credentials

As a quick setup you can export them as Actions secrets so they would be accessible to Serverless and the AWS SDK

  • secrets:


To deploy changes, simply push theme to github, no further action is needed !

Project Structure


If you have a code that will be used everywhere in the project, add it here…


This project uses Services Pattern which each service use a single Lambda function can handle a few jobs that are usually related via a data model or a shared infrastructure dependency, like devices and…

services can have different parts, for adding a new service, create a folder with the service name and add these files:


Implement a lambda handler function


Put every type and interface that related to this service in here.


Put your logics like calling apis, working with storage and… in here.


Define a lambda function thats related to this service


const deviceFunctions: NonNullable<Serverless['functions']> = {
    devices: {
        handler: 'bin/main',
        events: [
            { http: { method: 'post', path: '/api/devices', cors: true } },
            { http: { method: 'get', path: '/api/devices/{id}', cors: true } },


Manipulates dynamoDb data.


Define any kind of AWS resource like dynamoDB tables in here.


Define all function and resources which be used in testing


View Github