Installing Gremlin on Amazon ECS
Supported platforms:
N/A
Gremlin supports Amazon Elastic Container Service (ECS) using our container agent. This document will walk you through deploying the Gremlin container to your ECS deployment.
To get the most from this installation guide, you should also be familiar with installing Gremlin as a container. You can reference Installing Gremlin in a Docker Container for help.
Step 1: Create the task definition
- Copy the JSON task definition from the code block at the end of this step. In a text editor, replace
YOUR_TEAM_IDwith your Gremlin team ID,YOUR_TEAM_SECRETwith your Gremlin team secret andYOUR_GREMLIN_AGENT_VERSIONwith the agent version you wish to use.- For logging, set
YOUR_LOG_GROUP_NAMEandYOUR_REGIONto the CloudWatch log group and region you wish to use, respectively. - For privileges, set
YOUR_TASK_EXECUTION_ROLEto the ARN of the task execution role you wish to use, andYOUR_TASK_ROLEto the ARN of the task IAM role you wish to use.
- For logging, set
- Review the Task Definition's limits and CPU architecture values to ensure they match your target environment.
- In the AWS management Console, navigate to Task Definitions and choose Create New Task Definition with JSON.
- Paste the contents of your task definition into the JSON field, then click Create.
Step 2: Create the daemon service definition
- In the AWS Management Console, navigate to Clusters in ECS.
- Select the cluster you want to deploy Gremlin to.
- On the Services tab, click Create.
On the Configure Services page, set the parameters as follows:
- Select the Launch Type compute option.
- Select the EC2 launch type.
- Select the Service application type.
- Set Task Definition → Family to “gremlin”.
- Set Task Definition → Revision to “latest”.
- Set Service Type to DAEMON.
- Click Create to create the service.
Verifying the installation
To verify that Gremlin is properly installed and running:
- In the AWS management Console, navigate to Clusters.
- Select the cluster you just deployed Gremlin into.
- On the Services tab, you should now see the Gremlin service.
- Verify that Desired tasks matches the number of ECS hosts in your cluster
- Verify that Running tasks matches the number of Desired tasks. Note that it can take several minutes for the ECS scheduler to launch Gremlin to full capacity.
- Once the Gremlin service is running at full capacity, navigate to https://app.gremlin.com/clients/. You can search via the tag platform=ecs to verify that the Gremlin control plane can see the freshly launched ECS daemons.
- Navigate to https://app.gremlin.com/attacks/new and click on the Containers tab.
- Verify that you are seeing the application containers and tags currently running on your ECS cluster.
Additional ECS configuration options
There are some advanced options that change how Gremlin interacts with ECS:
networkMode: This option determines which network space we would like to affect. For example, setting it toawsvpcmeans the task can only affect the awsvpc interface. Some other options are:host,bridge, ornone. By default, this value is set tohost. For more information, please consult the AWS guide on network mode.pidMode: This parameter allows you to configure the container to share their process ID with either the host or other containers in the task. It may prove useful when performing process killer attacks to set this parameter to host. By default, this value is set tohost. For more information, please consult the AWS guide on PID mode.

