Skip to main content

chain work using AWS lambdas

Project description

# chained-aws-lambda

#### Running tests

Run make test in the top-level data-store directory.

#### Deployment

Assuming the tests have passed above, the next step is to manually deploy. See the section below for information on CI/CD with Travis if continuous deployment is your goal.

Now deploy using make:

make deploy

Set up AWS API Gateway. The gateway is automatically set up for you and associated with the Lambda. However, to get a friendly domain name, you need to follow the directions [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html). In summary:

  • Generate a HTTPS certificate via AWS Certificate Manager, make sure it’s in us-east-1

  • Set up the domain name in the API gateway console

  • Set up in Amazon Route 53 to point the domain to the API gateway

  • In the API Gateway, fill in the endpoints for the custom domain name e.g. Path=`/, Destination=`dss and dev. These might be different based on the profile used (dev, stage, etc).

  • Set the environment variable API_HOST to your domain name in the environment.local file.

If successful, you should be able to see the Swagger API documentation at:

https://<domain_name>

And you should be able to list bundles like this:

curl -X GET “https://<domain_name>/v1/bundles” -H “accept: application/json”

#### CI/CD with Travis CI We use [Travis CI](https://travis-ci.org/HumanCellAtlas/data-store) for continuous integration testing and deployment. When make test succeeds, Travis CI deploys the application into the dev stage on AWS for every commit that goes on the master branch. This behavior is defined in the deploy section of .travis.yml.

#### Authorizing Travis CI to deploy Encrypted environment variables give Travis CI the AWS credentials needed to run the tests and deploy the app. Run scripts/authorize_aws_deploy.sh IAM-PRINCIPAL-TYPE IAM-PRINCIPAL-NAME (e.g. authorize_aws_deploy.sh user hca-test) to give that principal the permissions needed to deploy the app. Because this is a limited set of permissions, it does not have write access to IAM. To set up the IAM policies for resources in your account that the app will use, run make deploy using privileged account credentials once from your workstation. After this is done, Travis CI will be able to deploy on its own. You must repeat the make deploy step from a privileged account any time you change the IAM policies in policy.json.template files.

[![](https://img.shields.io/badge/slack-%23data–store-557EBF.svg)](https://humancellatlas.slack.com/messages/data-store/) [![Build Status](https://travis-ci.org/HumanCellAtlas/data-store.svg?branch=master)](https://travis-ci.org/HumanCellAtlas/data-store) [![codecov](https://codecov.io/gh/HumanCellAtlas/data-store/branch/master/graph/badge.svg)](https://codecov.io/gh/HumanCellAtlas/data-store)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chained-aws-lambda-0.0.5.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

chained_aws_lambda-0.0.5-py2.py3-none-any.whl (29.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file chained-aws-lambda-0.0.5.tar.gz.

File metadata

File hashes

Hashes for chained-aws-lambda-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4b5fe4ce4b363084d358344c857538546447bdc6614a280f6dbf770eb155912b
MD5 4c0095c55b7770ca8af0519be642bdcb
BLAKE2b-256 b0f40e29cf000330dc02f1a21dc71f505f5150cbd1285af5052cc11d58cd0aff

See more details on using hashes here.

File details

Details for the file chained_aws_lambda-0.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for chained_aws_lambda-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 54ee88e6ff27448d1b9898eb2b33b6379f959a6bee5d1d6f1ec2baa7cad8e6ca
MD5 e4a04923a98552a84f21127462fefe8f
BLAKE2b-256 e64562b876ef50b38e762602fecfc8c213637e86b7092ce889dce13a4c773a19

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page