Name: github-issues-to-synapse-lambda
Owner: Sage Bionetworks
Description: Write open Github issues to a Synapse table
Created: 2017-10-03 17:51:52.0
Updated: 2017-10-03 17:55:42.0
Pushed: 2017-10-09 16:32:37.0
Homepage: null
Size: 12
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Write open Github issues to a Synapse table using AWS Lambda.
virtualenv
.pip install -r requirements.txt
)..zip
file:rt REPODIR=`pwd`
d ${VIRTUAL_ENV}/lib/python2.7/site-packages/
${REPODIR}/lambda-code.zip `find .`
-r ${REPODIR}/lambda-code.zip ${REPODIR}/export_repo_issues_to_synapse.py
s3 cp lambda-code.zip s3://my-bucket-for-lambda
lambda create-function --region us-east-1 --function-name IssuesToSynapse --code S3Bucket=my-bucket-for-lambda,S3Key=lambda-code.zip,S3ObjectVersion=1 --role arn:aws:iam::510534517075:role/MyLambdaRole --handler export_repo_issues_to_synapse.issues_to_table_handler --runtime python2.7 --timeout 100 --memory-size 512
Modifications to the code require re-creating the zip file, uploading to the S3 bucket, and then updating the Lambda function:
lambda update-function-code --function-name IssuesToSynapse --s3-bucket my-bucket-for-lambda --s3-key export_repo_issues_to_synapse.zip
A Synapse table that uses the following column IDs is required to exist:
15', '4372', '60818', '60819', '60852', '60853', '61041']
The Lambda function requires an event of the following format:
table_id": "syn123456", "repo": "myusername/myreponame"}
Where the table_id
is the same as the one created above, and the repo
is the repository from which to get the issues.