Skip to content

This is used to collect and compare the travel time between two sets of source and destination. The lambda just collects the data and writes it to s3.

Notifications You must be signed in to change notification settings

anjmittu/travel-time-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travel Time Collector

This is used to collect and compare the travel time between two sets of source and destination. The lambda just collects the data and writes it to s3.

Deploy lambda

Pre-reqs

You need to have aws credentials downloaded and stored in ~/.aws/credentials. You should also have python3 and pip installed.

Download pip dependencies

You will need to download the dependencies for the lambda function, so that they can be zipped up with the lambda.

$ cd ops
$ python -m venv ../venv
$ source ../venv/bin/activate
$ pip install boto3 googlemaps pytz
$ deactivate

Create a config for deployment

In order for the deploy script to know where to deploy to, you need to add a config.py file under the ops directory. There is an example config given.

Deploy time_collectors to env given in config

When you deploy you need to give the name of an evn given in the config. This lets multiple env be stored in the config

$ python deploy_lambda_code.py to_work
$ python deploy_lambda_code.py to_home

Set up trigger for lambda

The lambda can be set up to be triggered by any AWS lambda trigger. A common one might be to create a cloudwatch event that run every certain amount of time.

About

This is used to collect and compare the travel time between two sets of source and destination. The lambda just collects the data and writes it to s3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages