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

I-ALiRT: Add query api to s3 bucket #398

Merged

Conversation

laspsandoval
Copy link
Contributor

@laspsandoval laspsandoval commented Nov 13, 2024

Change Summary

Overview

OpsSW will need to query (and eventually download) their log files. What is the most important to them is that they are able to see the most recent log file. I have based the query on their feedback.

New Files

  • ialirt_api_manager_construct.py
    • Calls on query lambda to use in API Gateway.
  • ialirt_query_api.py
    • Created lambda that will be used to query the logs.

Updated Files

  • stackbuilder.py
    • Uses many of the resources in SDC stack: lambda layers, API Gateway, and Monitoring.
  • lambda_layer_construct.py
    • Allow IMAPLambdaLayer to accept scope so it can initialize correctly when used in multiple stacks.

Testing

  • test_ialirt_query_api.py
    • Tests ialirt_query_api.py.

Also I used the following GET command in Postman after deploying the stack:
https://vbnjpnz7ic.execute-api.us-west-2.amazonaws.com/prod/ialirt-log-query?year=2024&doy=045&instance=1

The output was
{
"files": [
"flight_iois_1.log.2024-045T16-54-46_123456.txt"
]
}
as expected

@laspsandoval laspsandoval self-assigned this Nov 13, 2024
@laspsandoval laspsandoval added this to the Nov 2024 milestone Nov 13, 2024
@laspsandoval laspsandoval linked an issue Nov 13, 2024 that may be closed by this pull request
Copy link
Contributor

@maxinelasp maxinelasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment about adding some additional docs, but once that's done it looks good to me!

Copy link

@torimarbois torimarbois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit and one formatting question. Besides those, LGTM!

@laspsandoval laspsandoval merged commit c46c59c into IMAP-Science-Operations-Center:dev Dec 3, 2024
2 checks passed
@laspsandoval laspsandoval deleted the api_s3_bucket branch December 3, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I-ALiRT: Create an API for s3
3 participants