- 5 minutes to read

Prerequisites for the AWS Monitoring Agent

Check these before you install the Nodinite AWS Monitoring Agent: the agent needs a server to run on, an identity in AWS with the right permissions, and a way out to the AWS endpoints. Getting the permissions right up front decides what your users can do later.

  • ✅ Pick the read-only or the operate IAM policy
  • ✅ Choose how the agent signs in to each AWS account
  • ✅ Open outbound HTTPS to the AWS regions you monitor

Understanding What the Agent Needs

Need What Why
A server Like the other Nodinite Monitoring Agents, with .NET 10 at its latest patch The agent runs there and is called by the Monitoring Service
An AWS identity per account An IAM user with an access key, or the default AWS credential chain of the server The agent reads, and optionally operates, your AWS resources
IAM permissions The read-only or the operate policy below Decides what the agent, and so your users, can do
Network Outbound HTTPS to the AWS endpoints, directly or through a proxy All monitoring goes through the AWS APIs and CloudWatch

How the Agent Signs In

You enter in the account's General tab The agent signs in
Access Key Id and Secret Access Key As the IAM user that owns the access key. The secret is stored encrypted in the agent settings.
Nothing With the default AWS credential chain of the server: the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, the shared credentials file, or the role of the container or EC2 instance the agent runs on

Set the optional Account Id too: the agent then reports an Error when the credentials sign in to another account. See Configuration.

IAM Permissions

Attach one of these two policies to the IAM user or role. Both are safe as they are, and you can replace "Resource": "*" with the ARNs of the resources the agent should see.

Read-only Policy

Covers all monitoring and every view: Details, Edit, History, and Messages.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "NodiniteMonitoringRead",
      "Effect": "Allow",
      "Action": [
        "account:ListRegions",
        "sqs:ListQueues",
        "sqs:GetQueueUrl",
        "sqs:GetQueueAttributes",
        "sqs:ListDeadLetterSourceQueues",
        "sqs:ListMessageMoveTasks",
        "sqs:ReceiveMessage",
        "sns:ListTopics",
        "sns:GetTopicAttributes",
        "sns:ListSubscriptionsByTopic",
        "sns:GetSubscriptionAttributes",
        "events:ListEventBuses",
        "events:ListRules",
        "events:DescribeRule",
        "events:ListTargetsByRule",
        "lambda:ListFunctions",
        "lambda:GetFunctionConfiguration",
        "cloudwatch:GetMetricData",
        "cloudwatch:DescribeAlarms",
        "cloudwatch:DescribeAlarmHistory"
      ],
      "Resource": "*"
    }
  ]
}
  • account:ListRegions is only used when an account lists no regions. Remove it if you list the regions yourself.
  • sqs:ReceiveMessage is only used by View Messages on a queue and Messages on a dead-letter queue. A message shown there returns to the queue, but its receive count goes up by one. Remove the action if nobody may read message content; those views then show an access error, and everything else keeps working.

Operate Policy

Add this statement to the read-only policy when users should run operations from Nodinite.

{
  "Sid": "NodiniteMonitoringOperate",
  "Effect": "Allow",
  "Action": [
    "sqs:PurgeQueue",
    "sqs:StartMessageMoveTask",
    "sqs:DeleteMessage",
    "sqs:SendMessage",
    "sns:Publish",
    "lambda:InvokeFunction",
    "events:EnableRule",
    "events:DisableRule",
    "cloudwatch:EnableAlarmActions",
    "cloudwatch:DisableAlarmActions"
  ],
  "Resource": "*"
}
Operation in Nodinite Actions it needs
Purge queue sqs:PurgeQueue
Delete messages (View Messages) sqs:ReceiveMessage, sqs:DeleteMessage
Send message (Post) sqs:SendMessage
Start redrive sqs:StartMessageMoveTask, plus sqs:ReceiveMessage and sqs:DeleteMessage on the dead-letter queue and sqs:SendMessage on the source queues
Publish message (Publish) sns:Publish
Trigger function (Trigger) lambda:InvokeFunction
Enable rule, Disable rule events:EnableRule, events:DisableRule
Enable alarm, Disable alarm cloudwatch:EnableAlarmActions, cloudwatch:DisableAlarmActions

A missing permission never stops the agent: the resource it concerns is Unavailable, or the operation fails with the message AWS returned. Which users may run an operation is decided in Nodinite; see Managing AWS.

What Firewall Settings Are Required?

graph LR subgraph "Nodinite Core Services Server" Mon(fa:fa-watch-fitness Monitoring Service) end subgraph "Nodinite Agent Server" Agent(fa:fa-monitor-waveform AWS Monitoring Agent) end subgraph "Target: AWS" Aws(fab:fa-aws AWS service endpoints) end subgraph "Other" Proxy(fa:fa-shuffle Outbound proxy, optional) Dns(fa:fa-signs-post DNS) end Mon -->|"Agent site port"| Agent Agent -->|"443"| Aws Agent -.->|"proxy port"| Proxy Proxy -.->|"443"| Aws Agent -->|"53"| Dns

The Monitoring Service calls the agent, and the agent calls the AWS endpoints over HTTPS, directly or through an optional outbound proxy (dashed). Each arrow starts at the side that opens the connection.

Note

When the agent runs on the Core Services Server, you need no firewall rule between the Monitoring Service and the agent.

Between the Monitoring Service and the AWS Monitoring Agent

Direction Source Destination Protocol Port(s) Purpose Notes
Inbound Core Services Server Agent Server TCP (HTTPS/HTTP) Agent site port Poll the agent, send configuration, run Remote Actions The port set for the agent in the Nodinite Portal. Only when the agent is on a remote server

Between the AWS Monitoring Agent and AWS

Direction Source Destination Protocol Port(s) Purpose Notes
Outbound Agent Server AWS service endpoints of each monitored region, *.amazonaws.com TCP (HTTPS) 443 SQS, SNS, EventBridge, Lambda, and CloudWatch APIs One set of endpoints per region you monitor. Allow by DNS name: AWS addresses change
Outbound Agent Server AWS Account Management endpoint TCP (HTTPS) 443 account:ListRegions Only when an account lists no regions
Outbound Agent Server Outbound proxy TCP The proxy's port Every call to AWS, when a proxy is set Settings > Basic > Outbound proxy in the Configuration

Between the Servers and DNS

Direction Source Destination Protocol Port(s) Purpose Notes
Outbound Agent Server DNS Server TCP/UDP 53 Name resolution Resolve the AWS endpoints, or the proxy
Outbound Core Services Server DNS Server TCP/UDP 53 Name resolution Resolve the Agent Server

The agent's calls to CloudWatch are billed by AWS; see Troubleshooting for the cost per resource.

Next Steps