AWS Fargate

The Akita Client can be deployed to monitor services running on AWS Fargate.

Unlike cluster-based ECS, Fargate is serverless and thus Akita cannot access the host network. However, you can configure Fargate to run the Akita agent as a sidecar in each container you deploy. This allows Akita to see all the network traffic to and from that container.

600

You can also change your container to include the Akita CLI; see "Use the Akita CLI as a Wrapper for your Server Process" in the Docker instructions.

Add the Akita container to your task definition

Within the containerDefinitions section of your task, add a new section containing the Akita Docker image. Fill in the workspace name and the API key that you created during Set up the App.

...
"containerDefinitions": [
  ...
  {
        "name": "akita",
        "image": "public.ecr.aws/akitasoftware/akita-cli:latest",
        "entryPoint": ["/akita", "apidump", "--service", "{workspace name}"],
        "environment" : [
             { "name" : "AKITA_API_KEY_ID", "value" : "{key id}" },
             { "name" : "AKITA_API_KEY_SECRET", "value" : "{key secret}" }
         ]
    }
]

You may want to specify a logConfiguration section in order to see the output from the Akita CLI; you can use whatever destination you store your application logs, or store them separately.

The Akita token can be stored in an AWS Secret instead of making it part of your task definition.

If you edit the task definition from the console, the settings look like the following:

1654 1829

Please note that the entry point is comma-separated on the console: /akita,apidump,--service,{yourservice} rather than space-separated as in the JSON example.

Launch your revised task definition

Once the task definition is saved, update your service as you ordinarily would. The Akita CLI will automatically start capturing traffic, and upload it for analysis.

In the Akita web console, you should be able to see a new trace in the Traces tab, or list them with the akita get trace CLI command. You can then wait for an automatically created model to appear, which will take only a couple of minutes.