Skip to content

swxsoc/sdc_aws_sorting_lambda

Repository files navigation

Overview

build status testing status codestyle and linting code coverage

This repository is to define the code to be used for the SWSOC file sorting Lambda function. This function will be deployed as a zip file to Lambda, with the production lambda being the latest release and the latest code on the master being used for development and testing. The production lambda will move files into the appropriate buckets while the development lambda will only move files with the prefix dev_.

Running Unit Tests

pytest --pyargs lambda_function/tests --cov=lambda_function/src --cov-report=html

Testing Lambda Locally

To test the Lambda function locally using Docker:

  1. Build the Lambda container image (from within the lambda_function folder):

    docker build -t sdc_aws_sorting_lambda:latest .
  2. Run the Lambda container image (after using your MFA script). This starts the Lambda runtime environment:

    docker run \
      -p 9000:8080 \
      -v "$(pwd)/tests/test_data:/test_data" \
      sdc_aws_sorting_lambda:latest
  3. From a separate terminal, make a curl request to the running Lambda function:

    curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d @tests/test_data/test_padre_event.json

Acknowledgements

The package template used by this package is based on the one developed by the NASA Space Weather Science Operations Center (SWxSOC) which is based on those provided by OpenAstronomy community and the SunPy Project.

This project makes use of the NASA Space Weather Science Operations Center (SWxSOC).

About

This repository is to define the code and Docker Container to be used for the SWSOC file sorting Lambda function.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors