---
title: "Nodinite AWS Monitoring Agent Prerequisites: IAM Policies, Credentials, and Firewall"
description: "Prerequisites for the Nodinite AWS Monitoring Agent: .NET 10, an IAM user or role with the ready-made read-only or operate policy, the permissions each Remote Action needs, and the firewall rules between Nodinite, the agent, and the AWS endpoints."
---

# :fa-square-plus: Prerequisites for the AWS Monitoring Agent

Check these before you install the :Nodinite: [AWS Monitoring Agent][AWS 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  

## :fa-network-wired: Understanding What the Agent Needs {#understanding}

| 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 |

## :fa-key: How the Agent Signs In {#sign-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][].

## :fa-user-shield: IAM Permissions {#iam}

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 {#read-only}

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

```json
{
  "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 {#operate}

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

```json
{
  "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][].

## :fa-shield-check: What Firewall Settings Are Required? {#firewall}

<div class="mermaid">
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
</div>

*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][NodinitePortal]<sup>:fa-arrow-up-right-from-square:</sup>. 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.

## :fa-hand-point-right: Next Steps

* :fa-rocket: [Install][]  
* :fa-edit: [Configuration][]  

## :fa-link-horizontal: Related Topics

* :fab fa-aws: [AWS Monitoring Agent][AWS Agent]  
* :fa-wrench: [Managing AWS][]  
* :fa-monitor-waveform: [Monitoring Agents][]  

[AWS Agent]:{ndr}/Logging%20and%20Monitoring/AWS/Overview.md
[Configuration]:{ndr}/Logging%20and%20Monitoring/AWS/Getting%20started/3.%20Configuration.md
[Install]:{ndr}/Logging%20and%20Monitoring/AWS/Getting%20started/2.%20Install.md
[Managing AWS]:{ndr}/Logging%20and%20Monitoring/AWS/Features/Managing%20AWS.md
[Monitoring Agents]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/What%20is%20a%20Monitor%20Agent.md
[Monitoring Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[NodinitePortal]:https://portal.nodinite.com
[Remote Actions]:{ndr}/Getting%20Started/3.%20Monitor/Remote%20Actions.md
[Troubleshooting]:{ndr}/Logging%20and%20Monitoring/AWS/Troubleshooting/Overview.md