Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 1.84 KB

README.md

File metadata and controls

62 lines (48 loc) · 1.84 KB

TccInspetorCore

  • Application to check if a given document follows the Brazilian standard for academic papers (ABNT). It corresponds to the TccInspetorCore component of the following architecture:

  • It was developed in Python.
  • It is deployed to AWS as a Lambda function and made available as a REST API by the AWS API Gateway.

Setup

Deployment Environment

The deployment in AWS is done as follows:

  • Create a Bucket in S3 and include a directory to store the documents that need to be checked
  • Clone the repository:
$ git clone https://github.com/ericknilsen/TccInspetorCore
  • Compress the content in lambda directory to a .zip file format
  • Create a Lambda function
  • Upload the .zip file in the function's code
  • Create a Gateway API for the function
  • Add a GET method in the API
  • Navigate to Integration Request -> Mapping Templates and add a Content-Type application/json with the following content:
{ "file": "$input.params('file')" }
  • Enable API CORS
  • Deploy the API
  • Edit the Lambda function's code
  • Rename the file credentials_example.json to credentials.json and insert the access data as follows:
{
  "bucketName": "BUCKET-NAME",
  "folder": "BUCKET-FOLDER",
  "region": "REGION",
  "accessKeyId": "ACCESS-KEY-ID",
  "secretAccessKey": "SECRET-ACCESS-KEY"
}

Development Environment

  • Clone the repository:
$ git clone https://github.com/ericknilsen/TccInspetorCore
  • Criate the file lambda/main.py to test the application locally with the following content:
  • Run the program:
$ python main.py