subhub/services/fxa
Stewart Henderson 4dd240c3a3 Prefer CFG to env 2020-05-04 09:19:11 -05:00
..
resources Initial Terraform boostrap and DynamoDB setup 2020-02-12 06:54:00 -06:00
README.md Arch 2.0 2020-02-10 09:47:57 -06:00
accounts.yml Update FxA account for SubHub prod-test 2019-10-02 14:26:12 -07:00
env.yml Remove AWS Xray 2020-04-29 09:26:04 -05:00
functions.yml redid disabling the blue-green deployments for lower envs 2019-10-23 11:39:16 -07:00
hubhandler.py Prefer CFG to env 2020-05-04 09:19:11 -05:00
miahandler.py Prefer CFG to env 2020-05-04 09:19:11 -05:00
serverless.yml Remove AWS Xray 2020-04-29 09:26:04 -05:00
whitelist.yml update whitelist 2019-09-27 10:23:01 -05:00

README.md

Serverless

Commands

From this (services/fxa) directory, execute the following commands of interest. NOTE: If you require extra detail of the Serverless framework, you will need to set the follow environment variable.

export SLS_DEBUG=*

Offline Testing

Start DynamoDB locally, sls dynamodb start &

Start offline services, serverless offline start --host 0.0.0.0 --stage dev

Once this is done, you can access the DynamoDB Javascript Shell by navigating here. Additionally, you may interact with the application as you would on AWS via commands such as:

  • Perform a HTTP GET of http://localhost:3000/v1/hub/version

Domain Creation

sls create_domain

Packaging

sls package --stage ENVIRONMENT

Where ENVIRONMENT is in the set of (dev, staging, prod).

You may inspect the contents of each packages with:

zipinfo .serverless/{ARCHIVE}.zip

Where ARCHIVE is a member of

  • hub
  • mia

Logs

You can inspect the Serverless logs by function via the command:

sls logs -f {FUNCTION}

Where FUNCTION is a member of

  • hub
  • mia

Live Tailing of the Logs

serverless logs -f {FUNCTION} --tail

Running

sls wsgi serve

To-do

References

  1. SLS_DEBUG
  2. API Gateway Resource Policy Support
  3. Add apig resource policy
  4. add PRIVATE endpointType
  5. Serverless AWS Lambda Events