Listify/Lambdas
2020-12-04 12:30:33 -05:00
..
APIs/src/main/java Removed main method out of file 2020-10-04 15:48:22 -04:00
Lists Merge pull request #172 from ClaytonWWilson/test-new-lambdas 2020-12-04 12:30:33 -05:00
Scraping Chaining, retries, and general scraping durability 2020-11-01 11:30:03 -05:00
README.md General Lambda root readme 2020-11-20 14:00:24 -05:00

Components

APIs

Contains logic to retrieve data from merchant APIs.

Lists

Contains client-facing Lambdas which are typically a rather thin wrapper over the database (MariaDB on AWS's RDS service) and other AWS services.

General Client-facing Serverside Flow

Client -> API Gateway endpoint -> Lambda  -> (same) API Gateway endpoint -> (same) Client
            |         .           |    .
           \ /       / \         \ /  / \
            '         |           '    |  
           AWS Cognito          MariaDB instance/Other AWS services(SES, Cognito)

Scraping

Contains logic to orchestrate runs using a scraping utility to collect merchant data and store it in the database

Common Troubleshooting

Logs

  • Logs may be written to by printing to the stdout. (Fancier logging is also possible, but currently not implemented)
  • Logs are avalaible on AWS's Cloudwatch under Log Groups -> {Lambda name}
  • Logs typically persist after deletion of the associated Lambda

Incomplete runs

Often if a run fails to complete, it is because the standard allocated time and memory/cpu is inadaquate.

  • Symptoms:
    • The running time (available in the Cloudwatch logs) is almost exactly the maximum time.
  • Resolutions:
    • Time may be increased.
    • CPU may be increased. CPU is proportional to memory, so CPU is increased by increasing memory allocation.