# FARGATE Apis

This repository consists of fargate tasks, we are using this for creating long processing tasks which cannot be handled from lambda. 

### What is this repository for? ###

* Repository consists of third-party api runners. It contains __pipl api__ __summary__ provider and __pipl api__ __enrichment task__, planning to implement __geomapping__ by creating another task in fargate.
* [Learn About Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted_Fargate.html)

### How do I get set up? ###

* You need to install `aws cli` [AWS CLI MAC](https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html)
* How to run after installing docker and aws cli

First login using this command
```
$(aws ecr get-login --no-include-email --region eu-west-1)
```
our region currently is `eu-west-1`

* Go to AWS console -> ECS -> Repositories, create a repository with a name such as `fansifter/api` or any other.
* Open repository
* Click __View push commands__ button, you will see all the commands which you need to run.
* You can trigger this task by yourself as well and also through lambda functions. We are triggering fargate tasks in lambda functions, -> `piplEnrich` and `piplSummary`


