> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levelblue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Redeploying an AWS Sensor using the same IP

> Instructions on Redeploying the AWS sensor while Retraining same IP

Follow these steps to redeploy your AWS USM Anywhere Sensor while conserving the same IP address:

<Info>
  [**Backup Current Configurations:**](https://docs.levelblue.com/documentation/usm-anywhere/user-guide/sensor-management/sensor-backups) Document your log sources, feeds, and integrations. Follow the step-by-step instructions to back up the sensor configuration.
</Info>

**1.     Delete the Sensor VM to Free the IP**

* In the AWS Console, delete the existing Sensor instance.
* This frees the private IP so that it can be reassigned through the Elastic IP configuration when you deploy the replacement sensor.

**2.     Download the AWS Sensor Template**

* Go to the USM Anywhere Sensor Downloads page

<img src="https://mintcdn.com/levelblue-5324744e/mVIMUWRjOXh7uM_4/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-sensor-download.png?fit=max&auto=format&n=mVIMUWRjOXh7uM_4&q=85&s=9715061545ccb488cc6cb24c593a1ea8" alt="Aws Sensor Download Pn" width="1483" height="756" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-sensor-download.png" />

* Locate the AWS VPC Sensor CloudFormation template and download it.

<img src="https://mintcdn.com/levelblue-5324744e/mVIMUWRjOXh7uM_4/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template.png?fit=max&auto=format&n=mVIMUWRjOXh7uM_4&q=85&s=0a665f70802656e318cfcee2b20f962d" alt="Aws Cloudformation Template Pn" width="1396" height="210" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template.png" />

* Save the template file locally for editing.

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-file.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=c130d2723bc12fc4f5cfa6d9c1de31fe" alt="Aws Cloudformation Template File Pn" width="521" height="149" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-file.png" />

**2.     Edit the CloudFormation Template**

* Open the downloaded template in a text editor.
* Insert the following section after the “TrafficMirroring” block to define the Primary IP parameter:

```
“PrimaryIP”:
{
"Type": "AWS::EC2::EIP",
"Description": "Primary IP",
"Type": "String"
},
```

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit1.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=d5aeeec9f35cb9ce65450a973f510053" alt="Aws Cloudformation Template Edit1 Pn" width="2646" height="994" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit1.png" />

* It should look like the following:

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit2.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=f5bf0582d23b34c428f65ea340122341" alt="Aws Cloudformation Template Edit2 Pn" width="2668" height="950" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit2.png" />

* In the NetworkInterfaces section of the template, update the Subnet configuration to include the Primary IP reference:

```
"SubnetId": { "Ref" : "SubnetId" },
"PrivateIpAddress": { "Ref" : "PrimaryIP" }
```

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit3.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=7d26918957c8fdf8b53a202b6fbe263c" alt="Aws Cloudformation Template Edit3 Pn" width="2574" height="958" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit3.png" />

* It will look like this:

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit4.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=b47bbfab0b5aefab045d4f2a50a718a9" alt="Aws Cloudformation Template Edit4 Pn" width="1216" height="810" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-cloudformation-template-edit4.png" />

* Save your changes to the modified template file.

**3.     Redeploying the Sensor with AWS CloudFormation**

* Log in to the AWS Management Console.
* Navigate to CloudFormation and select Create stack → With new resources (standard).
* Choose Upload a template file, then select the modified template you saved earlier.

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-upload-template.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=0d3fd8f731efb0965bfddad5926a01be" alt="Aws Upload Template Pn" width="1217" height="748" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-upload-template.png" />

* Continue through the stack creation wizard.
* When prompted, enter the previous Sensor IP address in the Primary IP field.

<img src="https://mintcdn.com/levelblue-5324744e/NzTNJmNqpUiJvDWU/images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-primary-ip.png?fit=max&auto=format&n=NzTNJmNqpUiJvDWU&q=85&s=cefaf0a5a9c7f5ef19279f254c444bb8" alt="Aws Primary Ip Pn" width="1385" height="590" data-path="images/usm-anywhere/deployment-guide/aws/aws-same-ip/aws-primary-ip.png" />

**4.     Complete the Redeployment**

* Proceed with the CloudFormation stack deployment as normal
* Once the stack finishes, the new AWS Sensor will be deployed with the same IP as the previous sensor.

**Restore Sensor Backup**

1. Open your virtualization management console and connect to the USM Anywhere Sensor virtual machine (VM).

   <Warning>
     **Important:** Alternatively, you can open an SSH session to the sensor VM. When using an SSH session, the default username is *sysadmin*.

     If you are accessing a USM Sensor through SSH and you specified a username other than the default (*sysadmin*) for your SSH access, you must use the following commands at the command line to "sudo up" and access the sensor console:

     ```
     # sudo su – sysadmin
     ```
   </Warning>
2. From the USM Anywhere Sensor console System Menu, select **Maintenance** and press **Enter**.

   <img src="https://mintcdn.com/levelblue-5324744e/Q_BhWHm3qHRMbGha/images/usm-anywhere/systemmenu.webp?fit=max&auto=format&n=Q_BhWHm3qHRMbGha&q=85&s=aa0be0e53b21b1051d996ef64084625e" alt="Systemmenu Web" width="520" height="237" data-path="images/usm-anywhere/systemmenu.webp" />
3. From the Maintenance menu, select **Restore Backup** and press **Enter**.

   <img src="https://mintcdn.com/levelblue-5324744e/JttNYaikKbN1las-/images/usm-anywhere/maintenancemenu-restorebackup.webp?fit=max&auto=format&n=JttNYaikKbN1las-&q=85&s=45d3eebcf31cc03b4570fab45c25d408" alt="Maintenancemenu Restorebackup Web" width="519" height="270" data-path="images/usm-anywhere/maintenancemenu-restorebackup.webp" />
4. Enter the FQDN and press **Enter**
5. Enter BackupID and press \*\*Enter. \*\*A progress bar will appear. Once it has completed, a dialog box confirming changes have been applied will appear.

   <img src="https://mintcdn.com/levelblue-5324744e/z8PrFh3-d5s1AvEf/images/applychangesdialogbox.jpg?fit=max&auto=format&n=z8PrFh3-d5s1AvEf&q=85&s=ce68b42ba9a8403d1a941480416b300e" alt="Applychangesdialogbox Jp" width="480" height="170" data-path="images/applychangesdialogbox.jpg" />
6. Press \*\*Enter. \*\*Your sensor will now be restored.
