Cloud (managed): EC2
The same one-click CloudFormation path as Fargate, but runs the agent on a single EC2 instance under systemd instead of as a Fargate task. Simpler mental model with SSH (or Session Manager) shell access, at the cost of operating a host (patching, AMI updates) and giving up Fargate’s built-in autoscale.
When to pick this
Section titled “When to pick this”- You prefer a single long-lived VM over an ECS service.
- You want SSH (or Session Manager) shell access for debugging.
- You are evaluating Argus and want the cheapest possible always-on shape.
- Your platform team standardizes on EC2 and is averse to adding ECS.
Prerequisites
Section titled “Prerequisites”- Complete Pre-flight first.
- A VPC and subnet with internet access (same rules as Fargate).
- Optional: SSH access. It is off by default and needs two parameters together, an
existing EC2 key pair in
KeyNameand a source CIDR inSSHAllowedCidr(for example203.0.113.4/32). Supplying only one does nothing: a key pair with no CIDR has no route in, and a CIDR with no key pair has nothing to authenticate against. Leave both blank, which is the recommended posture, and the stack opens no inbound port at all. The instance role includesAmazonSSMManagedInstanceCore, so you can always shell in with Session Manager without a key pair or an open port. - An enrollment token.
Walkthrough
Section titled “Walkthrough”Option A - via the dashboard drawer
Section titled “Option A - via the dashboard drawer”- In the Argus dashboard, click Deploy agent.
- Pick the Cloud (managed) shape.
- Switch from the Fargate tab to the EC2 tab.
- Copy the enrollment token from the credential card.
- Click Launch CloudFormation Stack to open the AWS form.
- Fill in:
- EnrollmentToken: paste from step 4.
- VpcId and SubnetId: pick yours.
- KeyName and SSHAllowedCidr: leave both blank to skip SSH entirely (Session Manager still works, and no inbound port is opened). To enable SSH you must set both: a key pair and the source CIDR allowed to reach port 22.
- InstanceType:
t3.mediumis the default and is enough for most accounts.
- Acknowledge IAM creation and click Create stack.
- The stack waits for the instance’s UserData to finish via
cfn-signal, soCREATE_COMPLETEactually means “agent is running”, not just “EC2 booted”. Expect 3-7 minutes including AMI boot, docker install, and image pull.
Option B - via the AWS CLI
Section titled “Option B - via the AWS CLI”aws cloudformation create-stack \ --region us-east-2 \ --stack-name argus-agent-ec2 \ --template-url https://api.argusdspm.com/downloads/argus-managed-ec2-v1.yml \ --capabilities CAPABILITY_IAM \ --parameters \ ParameterKey=EnrollmentToken,ParameterValue='argus_et_<your-token-here>' \ ParameterKey=VpcId,ParameterValue=vpc-xxxxxxxxxxxxxxxxx \ ParameterKey=SubnetId,ParameterValue=subnet-xxxxxxxxxxxxxxxxxKeyName and SSHAllowedCidr are both optional and only do anything together. Omit them to
skip SSH and leave the security group with no inbound rules. To enable it, add both:
ParameterKey=KeyName,ParameterValue=my-keypair \ ParameterKey=SSHAllowedCidr,ParameterValue=203.0.113.4/32Parameters reference
Section titled “Parameters reference”| Parameter | Default | Notes |
|---|---|---|
EnrollmentToken |
(required) | Bootstrap token. Stored as an AWS Secrets Manager SecureString. |
VpcId |
(required) | VPC where the agent runs. |
SubnetId |
(required) | Subnet in that VPC. Must reach the internet. |
KeyName |
(empty) | Optional EC2 key pair for SSH. Has no effect without SSHAllowedCidr. Leave blank to skip; Session Manager still works. |
SSHAllowedCidr |
(empty) | Optional source CIDR allowed to reach port 22, for example 203.0.113.4/32. Has no effect without KeyName. Blank means no inbound rule is created at all. |
InstanceType |
t3.medium |
Allowed: t3.small, t3.medium, t3.large, t3.xlarge. |
ArgusBackendUrl |
https://api.argusdspm.com |
Override only for self-hosted Argus. |
AgentImage |
ghcr.io/argusdspm/argus-agent:stable |
Pin a specific version for reproducibility. |
EnableRemediation |
false |
Grant Argus write access so it can FIX what it finds. Off by default: the default deployment can inspect the account but cannot change anything in it. Turn on at launch or later by updating the stack; the agent is not replaced and needs no re-enrolling. See IAM permissions. |
What gets deployed
Section titled “What gets deployed”- IAM instance role with the discovery policy plus
AmazonSSMManagedInstanceCorefor Session Manager. - IAM instance profile wrapping the role.
- Security group (egress 443 + DNS only).
- AWS Secrets Manager secret holding the enrollment token.
- CloudWatch log group (
/argus-agent/<stack-name>, 30-day retention). - EC2 instance (Amazon Linux 2 latest AMI via SSM lookup, so it works in every region without a per-region AMI mapping).
- A systemd unit
argus-agent.servicethat runs the agent container, bind-mounting/var/lib/argusso the per-container API key survives container restarts. - On the default rolling
:stableimage only: a weekly refresh cron on the instance (/etc/cron.weekly/argus-agent-refresh) that pulls the image and restarts the service only when the digest actually changed, keeping astabledeploy current without a redeploy. It lives inside the instance, so it is not an extra AWS resource. Pinned deploys skip it and never auto-update.
Verify
Section titled “Verify”The drawer’s progress strip flips green within 4-7 minutes (slower than Fargate because UserData runs sequentially: dnf install docker, docker pull, container start). From AWS:
# cfn-signal proves UserData ran cleanly:aws cloudformation describe-stacks \ --stack-name argus-agent-ec2 \ --query 'Stacks[0].StackStatus' --output text# expect: CREATE_COMPLETE
# Shell in via Session Manager (no SSH key needed):aws ssm start-session --target i-xxxxxxxxxxxxxxxxx# then on the box:systemctl status argus-agent.servicedocker logs argus-agentThe container logs show the same bootstrap sequence as the Fargate path. See Verifying connection.
Teardown
Section titled “Teardown”aws cloudformation delete-stack --stack-name argus-agent-ec2If you created an EC2 key pair just for this deploy, also:
aws ec2 delete-key-pair --key-name <your-key-name>