subhub/services/fxa
Marty Ballard 9fec2dacbf Release for 20191205 2019-12-05 09:58:22 -06:00
..
resources defect: doit table envar passing 2019-10-15 14:31:20 -05:00
README.md
accounts.yml Update FxA account for SubHub prod-test 2019-10-02 14:26:12 -07:00
env.yml Stripe API request deadline enablement 2019-11-08 12:50:59 -06:00
functions.yml redid disabling the blue-green deployments for lower envs 2019-10-23 11:39:16 -07:00
hubhandler.py Release for 20191205 2019-12-05 09:58:22 -06:00
miahandler.py Release for 20191205 2019-12-05 09:58:22 -06:00
serverless.yml Defect resolution of missing plugins 2019-11-15 10:17:37 -06:00
subhandler.py Release for 20191205 2019-12-05 09:58:22 -06: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/sub/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

  • sub
  • hub
  • mia

Logs

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

sls logs -f {FUNCTION}

Where FUNCTION is a member of

  • sub
  • 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