Skip to content

ghrcdaac/FCX-Histogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to deploy the histogram preprocessing script in the AWS lambda

It is supposed that the user has some prior knowledge about lambda and docker.

Pre-requisites

Deployement Details

  1. Export env variables for keys mentioned in .env.example into shell session.
    • example: export TF_VAR_aws_creds_path="xxxxxxx" TF_VAR_aws_region="xxxxxxx" TF_VAR_accountId="xxxxxxx"
  2. Deploy using bash deploy.sh. The bash script does the following things:
    1. Deploy the script to ECR using the predeploy script. - bash predeploy.sh - This will create a repository in the AWS ECR and - Build and upload the docker image to the ECR.
    2. Uses the following terraform commands to build and deploy the infrastrucutre needed for Histogram Preprocessing Tool:
      • terraform init
      • terraform plan
      • terraform apply
        • This will create a new lambda function (using docker inn ECR)
        • Configure REST API gateway for the lambda.
        • Add appropriate roles and permissions.
        • Add cloudwatch logs for the API and Lambda.
        • And add necessary configuration for the lambda execution environment.
  3. Use the Histogram_preprocessed_data.postman_collection.json postman collection to test the Lambda.

After terraform finishes building the Histogram tool infrastructure, it outputs env varaibles that can be used in the frontend.

  • For <sensitive> as output value, use terraform output <key_name>

To remove the Histogram preprocessing Tool

 - `terraform destroy`
      - removes the Lambda function, API Gateway and permissions.
 - Goto AWS ECR Management console and remove the created ECR.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published