nprapps/anno-lambda-preview

Name: anno-lambda-preview

Owner: NPR visuals team

Description: AWS lambda function that generates the anno-docs preview

Created: 2017-02-23 11:03:51.0

Updated: 2017-02-24 20:01:06.0

Pushed: 2018-03-01 01:01:46.0

Homepage: null

Size: 17

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

anno-lambda-preview

What is this?

AWS lambda function that generates the anno-docs preview, its main purpose if to offer a more autonomous way of previewing annotations on the editorial side.

This is a work in progress repo.

Assumptions

The following things are assumed to be true in this documentation.

For more details on the technology stack used with the app-template, see our development environment blog post.

What's in here?

The project contains the following folders and important files:

Bootstrap the project

Create a lambda function inside AWS using the AWS Console and write down the name you gave to that function and

Also write down the name ot the handler you used.

For example if you have used lambda.lambda_handler then you will need to create a file on code called lambda.py that should have a function with name lambda_handler in it, that receives as arguments an event and a context. That will be the entry point for your lambda execution.

To bootstrap the project:

nno-lambda-preview
rtualenv anno-lambda-preview
install -r requirements.txt
Run the project

Since some of the code on this repo should be identical to that of the origin anno-docs repo there's a fabric task that will grab the latest pushed files from master and place them in their corresponding place in the code folder. To sync those files run manually:

sync_anno_docs_files
deploy:function=FUNCTION_NAME

Where FUNCTION_NAME is the name of the created lambda function

The deploy function automatically invokes the sync task mentioned above.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.