Connect Akto with AWS ECS
Last updated
Last updated
Learn about how to send API traffic data from AWS ECS setup to Akto from your environment. Depending on your ECS infrastructure type refer to these respective sections:
When the ECS cluster is running on AWS FARGATE infrastructure, we will add a container to the task definition of the task, from which we want to monitor. Refer the below image to check your cluster type.
Setup Akto data processor using the guide here. Keep the values AKTO_MONGO_IP
and AKTO_NLB_IP
handy, as we will need them later.
Add a container with the configuration defined below. Please replace the AKTO_MONGO_IP
and AKTO_NLB_IP
variables, as obtained from step 1.
After adding this definition to the task, update the task revision in the service.
The containers for the task should show both your primary container and mirror-api-logging container.
When the ECS cluster is a EC2 instances cluster, we will create a task definition for the mirror-api-logging container and run the task as a daemonset.
Setup Akto data processor using the guide here. Keep the values AKTO_MONGO_IP
and AKTO_NLB_IP
handy, as we will need them later.
We will create a new task definition with launch type as EC2 instances, network mode host and the container details as follows. You can directly create a new task definition using the JSON given below. You can also refer the screenshots attached. Please replace the AKTO_MONGO_IP
and AKTO_NLB_IP
variables, as obtained from step 1.
We will create a daemonset service with launch type EC2. Go to services tab in the ECS cluster and click on Create
.
Select Launch type
in Compute options
and EC2
in Launch type
.
Select Service
in Application type
, select mirror-api-logging
in Family
( The task definition we just created ), enter mirror-api-logging
as Service name
and set the Service type
as Daemon
. Then click on Create
on the bottom of the page.
Voila, you have created a daemonset in ECS. You should see the traffic in Akto dashboard in some time.