@@ -95,14 +95,63 @@ Output will be sent to the console (via ``stdout``) regarding what detections ar
9595
9696<img src =" docs/images/non-interactive.png " alt =" non-interactive mode " width =" 700 " height =" 500 " >
9797
98+ #### Docker (Non-interactive Mode)
9899For Docker, use the following command to run the detection container non-interactively:
99100
100101``` bash
101102sudo docker run --rm quay.io/crowdstrike/detection-container
102103```
103104
105+ #### Kubernetes (Non-interactive Mode)
104106For Kubernetes environments, use the following command to run the detection container non-interactively:
105107
106108``` bash
107109kubectl create -f https://raw.githubusercontent.com/CrowdStrike/detection-container/main/detections.example.yaml
108110```
111+
112+ #### ECS Fargate (Non-interactive Mode)
113+
114+ For AWS ECS Fargate, use the following commands to run the detection container:
115+
116+ 1 . Create the CloudWatch log group if it doesn't already exist. Make sure to replace the region with your own:
117+ ``` bash
118+ AWS_REGION=" us-east-1"
119+
120+ aws logs create-log-group \
121+ --log-group-name /ecs/detection-container \
122+ --region $AWS_REGION
123+ ```
124+
125+ 3 . Update and register the task definition:
126+ ``` bash
127+ ACCOUNT_ID=$( aws sts get-caller-identity --query Account --output text)
128+
129+ # Update task definition with your account ID and region
130+ sed -i " s/ACCOUNT_ID/$ACCOUNT_ID /g" ecs-task-definition.json
131+ sed -i " s/AWS_REGION/$AWS_REGION /g" ecs-task-definition.json
132+
133+ # Register the task definition
134+ aws ecs register-task-definition \
135+ --cli-input-json file://ecs-task-definition.json
136+ ```
137+
138+ 4 . Run the task. Make sure to replace ` YOUR_CLUSTER ` , ` YOUR_SUBNET ` , and ` YOUR_SG ` with your own values:
139+ ``` bash
140+ aws ecs run-task \
141+ --cluster YOUR_CLUSTER \
142+ --task-definition detection-container \
143+ --launch-type FARGATE \
144+ --network-configuration " awsvpcConfiguration={subnets=[YOUR_SUBNET],securityGroups=[YOUR_SG],assignPublicIp=ENABLED}"
145+ ```
146+
147+ 5 . View the logs in CloudWatch:
148+ ``` bash
149+ # View logs in real-time (replace region if needed)
150+ aws logs tail /ecs/detection-container --follow --region us-east-1
151+ ```
152+
153+ > [ !NOTE]
154+ > For ECS Fargate deployment, ensure:
155+ > - The ECS execution role has permissions to pull images and write to CloudWatch Logs
156+ > - The CloudWatch log group is created before running the task
157+ > - CrowdStrike Falcon Container Sensor is deployed for detections to appear in the console
0 commit comments