diff --git a/monitoring/ingest_inspector/README.md b/monitoring/ingest_inspector/README.md index ed06fab96..95b9c6f24 100644 --- a/monitoring/ingest_inspector/README.md +++ b/monitoring/ingest_inspector/README.md @@ -134,9 +134,14 @@ The app has a number of features designed to make it as easy as possible for som You can use the app by visiting . - ## Development +### Backend +The backend consists of a single Lambda function, which fetches ingests from the Wellcome Storage Service. To run the Lambda function code locally, navigate into the `ingest_inspector/backend_lambda` directory and run: + +```shell +AWS_PROFILE=storage-developer python3 src/ingest_inspector_backend.py --ingest-id= +``` ### Frontend @@ -149,9 +154,16 @@ npm run dev ### Deployments +To upload a new version of the backend Lambda function into S3, run: + +```shell +AWS_PROFILE=storage-developer python3 ./builds/publish_lambda_zip.py monitoring/ingest_inspector/backend_lambda --bucket=wellcomecollection-storage-infra --key=lambdas/monitoring/ingest_inspector_backend.zip +``` + The frontend is hosted as a static website on S3 and served via CloudFront. To build and deploy the app, navigate into the `ingest_inspector/frontend` directory and run: ```shell sh deploy.sh ``` + diff --git a/monitoring/ingest_inspector/backend_lambda/src/ingest_inspector_backend.py b/monitoring/ingest_inspector/backend_lambda/src/ingest_inspector_backend.py index 1165ccc10..fcfd6b58e 100644 --- a/monitoring/ingest_inspector/backend_lambda/src/ingest_inspector_backend.py +++ b/monitoring/ingest_inspector/backend_lambda/src/ingest_inspector_backend.py @@ -83,7 +83,7 @@ def lambda_handler(event, context): if __name__ == "__main__": parser = argparse.ArgumentParser( - description="Index EBSCO item fields into the Elasticsearch reporting cluster." + description="Retrieve a single ingest from the Wellcome Storage Service by its ID." ) parser.add_argument( "--ingest-id",