---
title: "Deploying EC2 with Netprobe"
description: "Learn how to deploy an EC2 Fleet with Self-Announcing Netprobe using CloudFormation, including setup requirements and configuration details."
url: "https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/cloud-native-deployments/deploying-via-aws-cloudformation/ec2-with-netprobe/index.html"
---
The `EC2withNetprobe.yaml` CloudFormation template provisions an EC2 Fleet with multiple instances configured with a Self-Announcing Netprobe. It uses an EC2 Fleet to create instances. It also automates Netprobe installation and configuration setup as a `systemd` service during instance initialization via UserData.

The default instance type is `t3.large`, following the [ITRS AWS AMI](https://aws.amazon.com/marketplace/pp/prodview-vsgileoae4w5w) specifications. For complete details on the default virtual machine configuration, refer to [AWS virtual machine defaults](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/cloud-native-deployments/quickstart/virtual-machine-defaults/index.html).

## Prerequisites

- An AWS account with permissions to create EC2 Fleet and related resources.
- A VPC with at least one subnet in your target region. The specified subnet must exist within the specified VPC.
- Security groups configured with appropriate inbound and outbound rules for Netprobe and Gateway communication.
- An IAM instance profile with an S3 `read` access to the Netprobe artifacts bucket.
- The Netprobe installation package, setup file, and systemd service files should be located in an accessible S3 bucket. You can upload files to an S3 bucket using ```aws s3 cp /local/file/path s3://your-bucket-name/```.

## Input parameters

### EC2 Fleet configuration

| Parameter | Description | Default | Required |
|-----------|-------------|---------|----------|
| `AMIImageId` | AMI ID for the EC2 instances |  | Yes |
| `InstanceType` | EC2 instance type (e.g., t2.micro, t3.large) | t3.large | No |
| `EC2Name` | Name prefix for the EC2 instances | EC2withNetprobe | No |
| `NumberOfInstances` | Number of EC2 instances to create in the fleet | 1 | Yes |
| `KeyName` | Name of existing EC2 KeyPair |  | Yes |
| `IamInstanceProfile` | Name of the IAM instance profile to attach |  | Yes |
| `VpcId` | ID of the VPC where the instances will be launched |  | Yes |
| `SubnetId` | ID of the subnet where the instances will be launched |  | Yes |
| `SecurityGroupIds` | List of Security Group IDs to attach to the instances |  | Yes |
| `OwnerEmail` | Email of the instance owner | test@email.com | No |
| `EC2Purpose` | Purpose of the EC2 instances | Netprobe Deployment | No |

### Gateway configuration

| Parameter | Description | Default | Required |
|-----------|-------------|---------|----------|
| `GatewayHost` | Gateway host for Netprobe connection |  | Yes |
| `GatewayPort` | Gateway port for Netprobe connection | 7039 | No |

### Netprobe configuration

| Parameter | Description | Default | Required |
|-----------|-------------|---------|----------|
| `NetprobeInstallDirectory` | Directory where Netprobe will be installed | ~/geneos | No |
| `S3NetprobeURL` | S3 URL to the Netprobe tar.gz file |  | Yes |
| `NetprobePort` | Port number for Netprobe | 7036 | No |
| `S3NetprobeSetupURL` | S3 URL to the Netprobe setup XML file |  | Yes |
| `S3NetprobeServiceURL` | S3 URL to the Netprobe systemd service file |  | Yes |

## Verification and debugging

Run the following commands if you need to verify or debug your deployment.

### View template execution logs

```bash
ssh -i <privatekey> <user>@<host> "sudo cat /var/log/cloud-init-output.log"
```

### Check the service status

```bash
ssh -i <privatekey> <user>@<host> "systemctl is-active <service>.service"
```

### Download the logs

```bash
ssh -i <privatekey> <user>@<host> "sudo tar -cvz -C "cd <install_dir> && find <service> -type f -name '*.log' -print0 | sudo tar --null -czf - --files-from -" > <service>-logs.tar.gz
```

