> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/how-to-guides-1/setup/deploy-upsolver-on-aws/aws-role-permissions.md).

# AWS Role Permissions

When integrating with AWS, one or two managed roles are created in your account to give Upsolver the required access.

There are three role types. The role types in your account depend on the type of integration.

* With **Private VPC** integration, two roles are created:
  * **UpsolverManagementRole**
  * **UpsolverServerRole** &#x20;
* With **Upsolver Cloud** integration, one role includes the permissions of both the **UpsolverManagementRole** and the **UpsolverServerRole** roles, unless otherwise stated.

## Permissions

### **UpsolverServerRole**

This is the role that the Upsolver servers running in your VPC use to access the data in your account. The permissions given to this role are:

| Permission                                          | Description                                                                                                                    |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **s3:ListAllMyBuckets**                             | Allows the servers to view which buckets you have so Upsolver's UI can suggest them for your convenience.                      |
| **kinesis:ListStreams**                             | Allows the servers to identify your Kinesis Streams so that Upsolver's UI can suggest them for your convenience.               |
| **arn:aws:iam::aws:policy/ AmazonAthenaFullAccess** | <p>Allows the servers to manage your Athena tables.<br>Athena does not allow partial permissions; full access is required.</p> |
| **Additional data read/write permissions**          | When adding data sources or creating data outputs, you may need to add read/write permissions.                                 |

## Policies

### **UpsolverManagementRole**

#### Managed Policies

| Policy                              | Description                                                                                          |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **AWSCloudFormationReadOnlyAccess** | Permission is required for Upsolver to identify when the initial integration completed successfully. |

#### Custom Policies

| Policies                                                                                                                                                                                                                                                                                                                                                                                                                                      | Description                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| <p><strong>ec2:RunInstances,</strong> <br><strong>ec2:StartInstances,</strong> <br><strong>ec2:TerminateInstances,</strong> <br><strong>ec2:RequestSpotInstances, ec2:CancelSpotInstanceRequests,</strong> <br><strong>ec2:CreateVolume,</strong> <br><strong>ec2:AttachVolume,</strong> <br><strong>ec2:DeleteVolume</strong></p>                                                                                                            | Allows running and stopping Upsolver EC2 instances.             |
| <p><strong>ec2:DescribeInstances,</strong><br><strong>ec2:DescribeSpotInstanceRequests,</strong><br><strong>ec2:DescribeInstanceStatus,</strong><br><strong>ec2:CreateTags,</strong><br><strong>ec2:DescribeTags</strong></p>                                                                                                                                                                                                                 | Allows monitoring Upsolver EC2 clusters.                        |
| <p><strong>ec2:DescribeSecurityGroups,</strong><br><strong>ec2:DescribeImages,</strong><br><strong>ec2:DescribeImageAttribute</strong></p>                                                                                                                                                                                                                                                                                                    | Required for Spotinst validation.                               |
| <p><strong>ec2:AssociateAddress,</strong> <br><strong>ec2:DisassociateAddress,</strong> <br><strong>ec2:AllocateAddress,</strong> <br><strong>ec2:ReleaseAddress,</strong><br><strong>ec2:DescribeAddresses</strong></p>                                                                                                                                                                                                                      | Allows Upsolver to use static IP addresses for discoverability. |
| <p><strong>cloudwatch:PutMetricData,</strong> <br><strong>cloudwatch:GetMetricStatistics,</strong> <br><strong>cloudwatch:ListMetrics,</strong><br><strong>cloudwatch:DescribeAlarmHistory,</strong><br><strong>cloudwatch:DescribeAlarmsForMetric,</strong><br><strong>cloudwatch:DescribeAlarms</strong></p>                                                                                                                                | Auto Scaling against CloudWatch statistics and alarms.          |
| <p><strong>iam:ListPolicies,</strong><br><strong>iam:GetPolicyVersion,</strong><br><strong>iam:GetPolicy,</strong><br><strong>iam:ListRoles,</strong><br><strong>iam:ListInstanceProfiles,</strong><br><strong>iam:AddRoleToInstanceProfile,</strong><br><strong>iam:ListInstanceProfilesForRole,</strong><br><strong>iam:ListAttachedRolePolicies,</strong><br><strong>iam:ListAccountAliases,</strong><br><strong>iam:PassRole</strong></p> | Required for Spotinst for policy validation.                    |

```http
{
    "Statement": [
    "Action": [
        "ec2:DescribeSpotInstanceRequests",
        "ec2:DescribeAddresses",
        "ec2:DescribeInstances",
        "ec2:DescribeSecurityGroups",
        "ec2:DescribeInstanceStatus",
        "ec2:DescribeTags",
        "ec2:DescribeImages",
        "ec2:DescribeImageAttribute",
         "ec2:DescribeSpotPriceHistory",
        "cloudwatch:PutMetricData",
        "cloudwatch:GetMetricStatistics",
        "cloudwatch:ListMetrics",
        "cloudwatch:DescribeAlarmHistory",
        "cloudwatch:DescribeAlarmsForMetric",
        "cloudwatch:DescribeAlarms",
        "iam:ListPolicies",
        "iam:GetPolicyVersion",
        "iam:GetPolicy",
        "iam:ListRoles",
        "iam:ListInstanceProfiles",
        "iam:AddRoleToInstanceProfile",
        "iam:ListInstanceProfilesForRole",
        "iam:ListAttachedRolePolicies",
        "iam:ListAccountAliases",
        "iam:PassRole"
    ],
    "Resource": [
        "*"
    ],
    "Effect": "Allow"
        },
        {
    "Action": [
        "ec2:RequestSpotInstances",
        "ec2:CancelSpotInstanceRequests",
        "ec2:CreateTags",
        "ec2:AssociateAddress",
        "ec2:DisassociateAddress",
        "ec2:AllocateAddress",
        "ec2:ReleaseAddress"
    ],
    "Resource": [
        "*"
    ],
    "Effect": "Allow"
        },
        {
    "Condition": {
        "StringLike": {
            "aws:RequestTag/Name": "*upsolver*"
        }
    },
    "Action": [
        "ec2:CreateVolume",
        "ec2:RunInstances"
    ],
    "Resource": [
        "*"
    ],
    "Effect": "Allow"
        },
        {
    "Condition": {
        "StringLike": {
            "ec2:ResourceTag/Name": "*upsolver*"
        }
    },
    "Action": [
        "ec2:TerminateInstances",
        "ec2:StartInstances",
        "ec2:AttachVolume",
        "ec2:DeleteVolume",
        "ec2:RunInstances"
    ],
    "Resource": [
        "*"
    ],
    "Effect": "Allow"
        },
        {
    "Action": [
        "ec2:RunInstances"
    ],
    "Resource": [
        "arn:aws:ec2:*:*:network-interface/*",
        "arn:aws:ec2:*:*:subnet/*",
        "arn:aws:ec2:*::image/*"
    ],
    "Effect": "Allow"
        }
    ]
}
```

### **Server Role**

#### Managed Policies

| Policy                              | Description                                                                                                                                                                                         |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AmazonAthenaFullAccess**          | <p>Allows the servers to manage your Athena tables. Athena does not allow partial permissions; full access is required. </p><p>To configure finely grained permissions, use AWS Lake Formation.</p> |
| **AWSCloudFormationReadOnlyAccess** | Required for Upsolver to identify when potential follow-up integrations have completed successfully.                                                                                                |

#### Custom Policy:

```http
{
    "Statement": [
        {
    "Sid": "upsolverBucketAccess",
    "Action": [
        "s3:*"
    ],
    "Resource": [
        "arn:aws:s3:::us-east-1-upsolver-UPSOLVER_ORG_ID",
        "arn:aws:s3:::us-east-1-upsolver-UPSOLVER_ORG_ID/*"
    ],
    "Effect": "Allow"
        },
        {
    "Sid": "listStreams",
    "Action": [
        "kinesis:ListStreams"
    ],
    "Resource": [
        "*"
    ],
    "Effect": "Allow"
        },
        {
    "Sid": "upsolverManagedStream",
    "Action": [
        "kinesis:*"
    ],
    "Resource": [
        "arn:aws:kinesis:*:*:stream/upsolver_*"
    ],
    "Effect": "Allow"
        },
        {
    "Sid": "sendScalingMetrics",
    "Action": [
        "cloudwatch:PutMetricData"
    ],
    "Resource": [
        "*"
    ],
    "Effect": "Allow"
        }
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://upsolver.gitbook.io/content/how-to-guides-1/setup/deploy-upsolver-on-aws/aws-role-permissions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
