# 20  Configuring N2W with CloudFormation

The process to configure N2W to work with CloudFormation is a single stream that starts with subscribing to N2W on the Amazon Marketplace and ends with configuring the N2W server.

* N2W provides several editions, all of which support CloudFormation.
* An IAM role will automatically be created with minimal permissions and assigned to the N2W instance.

{% hint style="info" %}
Configure CPM with CloudFormation will fail where the requested Instance type is not supported in the requested Availability Zone. Retry your request, but do not specify an Availability Zone or choose `us-east-1a`, `us-east-1b`, `us-east-1c`, `us-east-1d`, or `us-east-1f`.
{% endhint %}

1. Go to <https://aws.amazon.com/marketplace>
2. Search for N2W Software.
3. Select the AWS Free Trial & BYOL CPM edition, and then select **View purchase options**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/zGmDjDo2pxf2Mw5o7zoV/CloudFormation%20with.png)

&#x20; 4\.  After reviewing the Overview, select **View purchase options** again.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/PAhePA4bqI98LM5hyGm7/cloudformation%2020-1.png)

&#x20;   5\.  After purchasing N2W Backup & Recovery for AWS Free Trial/BYOL, select **Launch your software**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/FAYAjROOwrnlzSqIUeSq/cloudformation%2020-2.png)

&#x20;   6\. In the **Setup section,** select **AWS** **CloudFormation** for the **Service**. Select the relevant **Version** and **Region,** and then select **Launch with CloudFormation**.

![](https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/OjTAln73HKGL4LS3Vx6d/cloudformation%2020-3%20cropped.png)

&#x20;   7\.  In the **Create Stack** page:

&#x20;        a.  In the Prerequisite - Prepare template section, select **Choose an existing template**.&#x20;

&#x20;        b.  In the Specify template section, select **Amazon S3 URL**. In the Amazon S3 URL window, the address of the template will appear.&#x20;

&#x20;        c.  Select **View in Infrastructure Composer**. &#x20;

&#x20;  8\.  Select **Next**. The **Configure stack options** page opens.&#x20;

&#x20;       a. If needed, select **Add new tag**.

&#x20;       b. In the **Capabilities** section, select **I acknowledge that AWS CloudFormation might create IAM resources**.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/QnEqVyAWYVRNfPAjvfUn/cloudformation%2020-5%20configure%20stack%20options%20cropped.png" alt=""><figcaption></figcaption></figure>

&#x20;9\.  Select **Next**. The **Specify stack details** page opens.  Provide a stack name and parameters.&#x20;

{% hint style="info" %}
For **Inbound Access CIDR**, security groups act as a firewall for associated instances, controlling both inbound and outbound traffic at the instance level. Configuring **Inbound Access CIDR** allows you to add rules to a security group that enable you to connect to your Linux instance from your IP address using SSH:

If your IPv4 address is `203.0.113.25`, specify `203.0.113.25/32` to list this single IPv4 address in CIDR notation.

If your company allocates addresses within a range, specify the entire range, such as `203.0.113.0/24`.

If you specify `0.0.0.0/0`, it will enable all IPv4 addresses to access your instance using SSH.

For further details, refer to “Adding a Rule for Inbound SSH Traffic to a Linux Instance” at <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html>
{% endhint %}

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/U5EFlHhRCmoHYwFsbb01/cloudformation%2020-6%20Specify%20stack%20details%20cropped.png" alt=""><figcaption></figcaption></figure>

10. &#x20;Select **Next**. The **Review and create** page opens. Review and edit as necessary.&#x20;
    1. Step 1, Specify template, and Step 2, Specify stack details:

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/mrXfABeEO5t370xnJbaE/cloudformation%2020-7a%20Specify%20stack%20details%20cropped.png" alt=""><figcaption></figcaption></figure>

&#x20;     b.  Step 2, Parameters, and Step 3 Configure stack options, such as Tags and Permissions:

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/Rf9FmPIvB2icmpItrJYX/cloudformation%2020-7b%20paramters%20through%20permissions.png" alt=""><figcaption></figcaption></figure>

&#x20;     c.  Step 3, Stack failure options, Stack policy, and Rollback configuration:&#x20;

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/u73CuDACFAuJVVugJU1T/cloudformation%2020-7c%20stack%20failure%20through%20rollback%20options.png" alt=""><figcaption></figcaption></figure>

&#x20;   d.  Step 3, Notification options, Stack create options, and Quick-create link:

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/zBvaXsTzrdjkvWgWf2R9/cloudformation%2020-7d%20Notification%20settings%20through%20submit.png" alt=""><figcaption></figcaption></figure>

11. &#x20;After all sections are reviewed, select **Submit**. The last configuration page opens, where you can observe the progress of the stack creation.

<figure><img src="https://content.gitbook.com/content/5oB64hgFIX2jdQ2O72cF/blobs/cbQ6iKgXOX7fPhZi6Vrx/cloudformation%2020-8%20configuring%20last%20screen.png" alt=""><figcaption></figcaption></figure>

&#x20;   12\. Continue configuring N2W as in section [2](https://docs.n2ws.com/user-guide/2-configuring-n2ws).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.n2ws.com/user-guide/20-configuring-n2ws-with-cloudformation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
