Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicor88/insert-to-db.python.lambda

Generic AWS lambda to insert an event in a Database
https://github.com/nicor88/insert-to-db.python.lambda

aws lambda python travis-ci

Last synced: about 1 month ago
JSON representation

Generic AWS lambda to insert an event in a Database

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/nicor88/insert-to-db.python.lambda.svg?branch=master)](https://travis-ci.org/nicor88/insert-to-db.python.lambda)

# insert-to-db.python.lambda
Generic AWS lambda to insert an event to a Postgres Database (for now)

## Local development
It's possible to use VIRTUALENV or create a conda environment

conda create --name insert-into-db-lambda python=3.6

source activate insert-into-db-lambda

## Install Libs

pip install pytest

pip install -r requirements.txt

## Run tests
`py.test -vv -r sxX`
or
`make run_tests` (it only works if you have a conda env called `insert-into-db-lambda`)

## AWS Setup
Requirements:
* Handler: `lambda_function.lambda_handler`
* Runtime: `python3.6`
* Environment variables:
* `DB_USER`
* `DB_PASSWORD`
* `DB_HOSTNAME`
* `DB_NAME`