项目作者: nicor88

项目描述 :
Generic AWS lambda to insert an event in a Database
高级语言: Python
项目地址: git://github.com/nicor88/insert-to-db.python.lambda.git
创建时间: 2017-09-08T19:27:04Z
项目社区:https://github.com/nicor88/insert-to-db.python.lambda

开源协议:

下载


Build Status

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

  1. conda create --name insert-into-db-lambda python=3.6
  2. source activate insert-into-db-lambda

Install Libs

  1. pip install pytest
  2. 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