Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break out cyhy-nvdsync and cyhy-kevsync into AWS Lambdas #83

Open
3 tasks
mcdonnnj opened this issue Apr 6, 2023 · 0 comments
Open
3 tasks

Break out cyhy-nvdsync and cyhy-kevsync into AWS Lambdas #83

mcdonnnj opened this issue Apr 6, 2023 · 0 comments
Labels
breaking change This issue or pull request involves changes to existing functionality improvement This issue or pull request will add or improve functionality, maintainability, or ease of use

Comments

@mcdonnnj
Copy link
Member

mcdonnnj commented Apr 6, 2023

💡 Summary

The cyhy-nvdsync and cyhy-kevsync scripts in cisagov/cyhy-core should be broken out into Lambdas that are triggered with CloudWatch events on the same timer basis as the scripts are currently run in production.

Motivation and context

Given what the two scripts do:

  • Retrieve data from a remote source.
  • Minimally process the data.
  • Add documents with this processed data to the appropriate collection.

it would make sense to break them out into Lambdas. This would align with other Lambdas in the CyHy system like cisagov/assessment-data-import and cisagov/findings-data-import. This would also remove the need to maintain an EC2 instance to run these tasks.

Implementation notes

Since cisagov/cyhy-core is written in Python 2 these two scripts would need to be ported to Python 3 and new ODMs would have to be written in a MongoDB ODM library that runs on Python 3 (since MongoKit does not support Python 3). Options that are currently maintained include:

The projects would need to be based on cisagov/skeleton-aws-lambda-python to generate artifacts.

MongoDB consideration

This work must support MongoDB 3.6 as that is still what is currently in use.

Acceptance criteria

  • cyhy-nvdsync is ported to a Lambda.
  • cyhy-kevsync is ported to a Lambda.
  • Appropriate Terraform is written in cisagov/cyhy_amis to provision these Lambdas and provide the necessary access to write to the database.
@mcdonnnj mcdonnnj added breaking change This issue or pull request involves changes to existing functionality improvement This issue or pull request will add or improve functionality, maintainability, or ease of use labels Apr 6, 2023
@michaelsaki michaelsaki self-assigned this Feb 21, 2024
@michaelsaki michaelsaki removed their assignment May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue or pull request involves changes to existing functionality improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Status: No status
Status: Blocked
Development

No branches or pull requests

2 participants