What the stack creates
- An EC2 instance named
observer-agent: Amazon Linux 2023 (arm64),t4g.nanoby default, an encrypted 8 GB gp3 volume, IMDSv2 required. - A security group with outbound rules only.
- A Secrets Manager secret that holds the agent key. The instance reads it at first boot, so the key never appears in the instance user data.
- An IAM role for the instance. It may read that one secret, and it
carries
AmazonSSMManagedInstanceCoreso you can open a shell with Session Manager instead of SSH.
observer-agent systemd service.
Before you start
- Create the agent in Observer: Agents, Add agent, then Cloud platforms. Copy the key. Observer shows it once.
-
Pick the VPC of the services the agent should check, and a subnet in
it with outbound internet access. Either:
- a public subnet, with a public IP (the default), or
- a private subnet behind a NAT gateway, with the public IP turned off.
- Deploy in the region of that VPC.
Parameters
Deploy with the AWS CLI or CloudShell
1
Download the template
2
Create the stack
AssignPublicIp=false
to the overrides. Add --region <region> when the VPC is not in your
default region. CAPABILITY_IAM lets the stack create the instance
role. The command waits until the stack is created.Deploy from the AWS console
There is no Launch Stack button yet. Upload the template instead:1
Download the template
Save
observer-agent.yaml
to your computer.
2
Create the stack
Open CloudFormation in the region of your VPC and choose
Create stack, With new resources (standard). Keep Choose an
existing template, then pick Upload a template file, select
observer-agent.yaml and choose Next.3
Fill in the parameters
Name the stack (for example
observer-agent). Paste the key into
Agent key, then pick the VPC and the Subnet. For a private
subnet behind a NAT gateway, set Public IP for outbound traffic to
false. Choose Next, keep the stack options, and choose Next
again.4
Create it
Tick the acknowledgement that CloudFormation might create IAM
resources, then choose Submit. The stack reaches
CREATE_COMPLETE in a few minutes.Check that it connected
A few minutes after the stack completes, the Add agent screen shows Connected and the Agents page marks the agent as running. The instance first boots, then downloads and installs the agent. If it does not connect, read the agent’s logs. The stack’sLogs
output holds the command:
observer-agent service does not exist, the install at first boot
failed: its output is in /var/log/cloud-init-output.log. The usual
cause is a subnet without outbound internet access, which also stops
Session Manager from connecting.
Add settings and secrets
The agent reads its environment from/etc/observer-agent/agent.env.
To add a variable, such as PROMETHEUS_SERVER_URL or a secret that a
probe references by name (connection_string_ref and the like), edit
the file and restart the service:
AGENT_KEY in the same file. Updating the stack’s AgentKey
parameter does not reach a running instance: the instance reads the
secret only at first boot. See
Environment variables for
every setting.
Upgrades
The stack installs the agent binary with the install script. To upgrade, run the script again from a Session Manager shell. It replaces the binary, restarts the service, and keeps the key and your settings:-s -- --version <X.Y.Z> after sh.

