GithubHelp home page GithubHelp logo

artsy / lambda-s3-redshift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joeyaghion/lambda-s3-redshift

1.0 8.0 1.0 7 KB

Builds an AWS Lambda function that can load gzipped JSON files from S3 into Redshift via a staging table.

License: MIT License

JavaScript 100.00%

lambda-s3-redshift's Introduction

lambda-s3-redshift

This AWS Lambda function loads [gzipped] JSON data from S3 into a Redshift table, making use of a staging table to avoid duplication.

Set-up:

git clone <repo>
cd <dir>
nvm install 4.3 # version supported by AWS Lambda
nvm use 4.3
npm install
cp config.example.json config.json # and edit to suit needs
npm run setup # optional, to create staging table
npm run simulate # optional, to simulate Lambda function (WARNING: accesses _real_ S3/Redshift resources)
npm run zip # package for upload to AWS

Configuration

The following keys in config.json must be customized to suit your environment:

  • awsAccessKeyId: AWS access key with access to the S3 source location
  • awsSecretAccessKey: AWS secret key matching the above access key
  • connectionString: A valid connection string to your Redshift destination database (e.g., postgres://user:pass@dbhost:5439/dbname)
  • destinationTable: Name of the Redshift table to load data into
  • stagingTable: Name of a Redshift table where this function can track in-progress work (once configuration is set, you can create this table with node setup)

Copyright 2015 Joey Aghion, Artsy [MIT license]

lambda-s3-redshift's People

Contributors

joeyaghion avatar

Stargazers

Daniel (dB.) Doubrovkine avatar

Watchers

 avatar Anandaroop Roy avatar Daniel (dB.) Doubrovkine avatar James Cloos avatar Justin Bennett avatar Christina avatar Samuel Rozenberg avatar  avatar

Forkers

cavvia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.