> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon S3 AssumeRole Connector

## Intro

Amazon S3 is an online file storage web service offered by Amazon Web Services that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. Domo's AmazonS3 AssumeRole Connector allows you to pull data from S3 bucket using AssumeRole authentication. To learn more about the Amazon S3 API, visit their page ([http://docs.aws.amazon.com/AmazonS3/...I/Welcome.html](http://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html "http://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html") ).

The Amazon S3 AssumeRole connector is a "File" connector, meaning it retrieves files and outputs them to Domo. In the Data Center, you can access the connector page for this and other File connectors by clicking **File** in the toolbar at the top of the window.

You connect to your Amazon S3 account in the Data Center. This topic discusses the fields and menus that are specific to the Amazon S3 connector user interface. General information for adding DataSets, setting update schedules, and editing DataSet information is discussed in [Adding a DataSet Using a Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Connector").

<table class="mt-responsive-table" data-aura-rendered-by="33:195;a"><tbody><tr><td class="mt-noheading" colspan="1" rowspan="1"><p><b> Primary Use Cases </b></p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> This connector is an excellent choice for retrieving flat files when APIs are not an option. </p></td></tr><tr><td class="mt-noheading" colspan="1" rowspan="1"><p><b> Primary Metrics </b></p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> N/A </p></td></tr><tr><td class="mt-noheading" colspan="1" rowspan="1"><p><b> Primary Company Roles </b></p></td><td class="mt-noheading" colspan="1" rowspan="1"><ul><li> Data specialists </li><li> Marketing roles </li><li> Finance roles </li><li> Anyone who has data stored in S3 </li></ul></td></tr><tr><td class="mt-noheading" colspan="1" rowspan="1"><p><b> Average Implementation Time </b></p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> Less than an hour if you have the correct file types in S3. </p></td></tr><tr><td class="mt-noheading" colspan="1" rowspan="1"><p><b> Ease of Use (on a 1-to-10 scale with 1 being easiest) </b></p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> 4 </p></td></tr></tbody></table>

## Best Practices

Understanding the data stored in S3 and its relation to other S3 databases will be a huge asset in using this connector.

## Prerequisites

To connect to your Amazon S3 account and create a DataSet, you must have the following:

* The Amazon Resource Name (ARN) of the role to assume.
* The identifier for the assumed role session. You will need to set up a trust policy. This is described in continuation.
* The unique identifier used by third parties when assuming roles in their customers' accounts.
* The name of the Amazon S3 bucket you want to pull data from.

### Trust policy configuration

The trust policy for the role session identifier should look as follows:

```json theme={"dark"}
{
   "Effect": "Allow",
   "Principal": {
      "AWS": "arn:aws:iam::*accountId*:root"
   },
   "Action": "sts:AssumeRole",
   "Condition": {
      "StringEquals": {
         "sts:ExternalId": "*customer externalID*"
      }
   }
}
```

Account IDs for Domo environments are as follows:

* US: 339405024189
* AU: 010251424122
* EMEA (IE): 687132894031
* JP: 622384692065
* CA:
  710710207408

<table border="1" data-aura-rendered-by="33:195;a"><tbody><tr><td colspan="1" rowspan="1"><b> ID Types </b></td><td colspan="1" rowspan="1"><b> Description </b></td></tr><tr><td colspan="1" rowspan="1"> EXTERNAL\_ID: </td><td colspan="1" rowspan="1"> ID generated by DOMO. </td></tr><tr><td colspan="1" rowspan="1"> ACCOUNT\_ID: </td><td colspan="1" rowspan="1"> Select your Account\_ID from the above-mentioned list as per your country. </td></tr></tbody></table>

```json theme={"dark"}
{
   "Effect": "Allow",
   "Principal": {
      "AWS": " arn:aws:iam::46822464880681:user/myIAMuser123 "
   },
   "Action": "sts:AssumeRole",
   "Condition": {
      "StringEquals": {
         "sts:ExternalId": "010251424122"
      }
   }
}
```

## Connecting to an Amazon S3 Bucket

This section enumerates the options in the **Credentials** and **Details** panes in the Amazon S3 AssumedRole Connector page. The components of the other panes in this page, **Scheduling** and **Name & Describe Your DataSet**, are universal across most connector types and are discussed in greater length in [Adding a DataSet Using a Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Connector").

### Creating an IAM role (console)

You can use the AWS Management Console to create a role that an IAM user can assume. For example, assume that your organization has multiple AWS accounts to isolate a development environment from a production environment. For high-level information about creating a role that allows users in the development account to access resources in the production account, see

[Example scenario using separate development and production accounts](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html#id_roles_common-scenarios_aws-accounts-example "Example scenario using separate development and production accounts").

**To create a role (console)**

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/ "https://console.aws.amazon.com/iam/").
2. In the navigation pane of the console, choose **Roles** and then choose **Create role**.
3. Choose **AWS account** role type.
4. To create a role for your account, choose **This account**. To create a role for another account, choose **Another AWS account** and enter the **Account ID** to which you want to grant access to your resources.

   The administrator of the specified account can grant permission to assume this role to any IAM user in that account. To do this, the administrator attaches a policy to the user or a group that grants permission for the `sts:AssumeRole` action. That policy must specify the role's ARN as the `Resource`.
5. If you are granting permissions to users from an account that you do not control, and the users will assume this role programmatically, select **Require external ID**. The external ID can be any word or number that is agreed upon between you and the administrator of the third-party account. This option automatically adds a condition to the trust policy that allows the user to assume the role only if the request includes the correct`sts:ExternalID`. For more information, see [How to use an external ID when granting access to your AWS resources to a third party](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html "How to use an external ID when granting access to your AWS resources to a third party").

   **Important**

   Choosing this option restricts access to the role only through the AWS CLI, Tools for Windows PowerShell, or the AWS API. This is because you cannot use the AWS console to switch to a role that has an `externalId` condition in its trust policy. However, you can create this kind of access programmatically by writing a script or an application using the relevant SDK. For more information and a sample script, see [How to Enable Cross-Account Access to the AWS Management Console](http://aws.amazon.com/blogs/security/how-to-enable-cross-account-access-to-the-aws-management-console "How to Enable Cross-Account Access to the AWS Management Console") in the AWS Security Blog.
6. If you want to restrict the role to users who sign in with multi-factor authentication (MFA), select **Require MFA**. This adds a condition to the role's trust policy that checks for an MFA sign-in. A user who wants to assume the role must sign in with a temporary one-time password from a configured MFA device. Users without MFA authentication cannot assume the role. For more information about MFA, see [Using multi-factor authentication (MFA) in AWS](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html "Using multi-factor authentication (MFA) in AWS")
7. Choose **Next**.
8. IAM includes a list of the AWS managed and customer managed policies in your account. Select the policy to use for the permissions policy or choose **Create policy** to open a new browser tab and create a new policy from scratch. For more information, see [Creating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html#access_policies_create-start "Creating IAM policies"). After you create the policy, close that tab and return to your original tab. Select the check box next to the permissions policies that you want anyone who assumes the role to have. If you prefer, you can select no policies at this time, and then attach policies to the role later. By default, a role has no permissions.
9. (Optional) Set a [permissions boundary](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html "permissions boundary"). This is an advanced feature.

   Open the **Set permissions boundary** section and choose **Use a permissions boundary to control the maximum role permissions**. Select the policy to use for the permissions boundary.
10. Choose **Next**.
11. For **Role name**, enter a name for your role. Role names must be unique within your AWS account. They are not distinguished by case. For example, you cannot create roles named both `PRODROLE` and `prodrole`. Because other AWS resources might reference the role, you cannot edit the name of the role after it has been created.
12. (Optional) For **Description**, enter a description for the new role.
13. Choose **Edit** in the **Step 1: Select trusted entities** or **Step 2: Add permissions** sections to edit the use cases and permissions for the role.
14. (Optional) Add metadata to the role by attaching tags as key–value pairs. For more information about using tags in IAM, see [Tagging IAM resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html "Tagging IAM resources").
15. Review the role and then choose **Create role**.

### Credentials Pane

This pane contains fields for entering credentials to connect to an Amazon S3 bucket. The following table describes what is needed for each field:

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:195;a"><thead><tr><th colspan="1" rowspan="1"><p><span class="s1"> Field </span></p></th><th colspan="1" rowspan="1"><p><span class="s1"> Description </span></p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> Role ARN </p></td><td colspan="1" rowspan="1"><p> Enter the Amazon Resource Name (ARN) of the role you want to assume. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Role Session Name </p></td><td colspan="1" rowspan="1"><p> Enter the identifier for the assumed role session. </p></td></tr><tr><td colspan="1" rowspan="1"><p> External ID </p></td><td colspan="1" rowspan="1"><p> Enter the unique identifier used by third parties when assuming roles in their customers' accounts. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Bucket </p></td><td colspan="1" rowspan="1"><p> Enter the Amazon S3 Bucket you want to pull files from. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Region </p></td><td colspan="1" rowspan="1"><p> Select the S3 Bucket Region where your file is located. </p></td></tr></tbody></table>

Once you have entered valid Amazon S3 credentials, you can use the same account any time you go to create a new Amazon S3 AssumedRole DataSet. You can manage connector accounts in the **Accounts** tab in the Data Center. For more information about this tab, see [Manage Connector Accounts](https://domo-support.domo.com/s/article/360042926054?language=en_US "Manage Connector Accounts").

### Details Pane

This pane contains various menus for locating and configuring the file you want to pull into Domo.

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:195;a"><thead><tr><th colspan="1" rowspan="1"><p> Menu </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> File Type to Import </p></td><td colspan="1" rowspan="1"><p> Select the type of file you want to import into Domo, either CSV, JSON, TSV, TXT, XML, XLS, or XLSX. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Does Your Filename Have an Extension? </p></td><td colspan="1" rowspan="1"><p> Select <b> Yes </b> if the filename ends with the supported file type extension; otherwise select <b> No </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> How Would You Like to Choose Your Filename? </p></td><td colspan="1" rowspan="1"><p> Select how you want Domo to identify your file. Options are as follows: </p><table border="1" cellpadding="1" cellspacing="1" class="mt-responsive-table"><tbody><tr><td class="mt-noheading" colspan="1" rowspan="1"><p> Complete Filename </p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> You enter the complete path to the file. </p></td></tr><tr><td class="mt-noheading" colspan="1" rowspan="1"><p> Partial Filename </p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> You enter a partial file name and specify whether the file to retrieve starts with or contains the name you have entered. </p></td></tr><tr><td class="mt-noheading" colspan="1" rowspan="1"><p> FilesDiscovery </p></td><td class="mt-noheading" colspan="1" rowspan="1"><p> A list of files in the selected bucket appears and you choose the one you want. This option is available <em> only </em> when your selected S3 bucket contains fewer than 100 files. </p></td></tr></tbody></table></td></tr><tr><td colspan="1" rowspan="1"><p> Enter Complete Filepath </p></td><td colspan="1" rowspan="1"><p> Enter the complete path for the desired file. </p></td></tr><tr><td colspan="1" rowspan="1"><p> List of Files from Amazon S3 Bucket </p></td><td colspan="1" rowspan="1"><p> Select the file you want to retrieve. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Prefix (Optional) </p></td><td colspan="1" rowspan="1"><p> Enter a prefix to filter results by. A prefix limits results to only those keys that begin with the given prefix. </p></td></tr><tr><td colspan="1" rowspan="1"><p> File Name </p></td><td colspan="1" rowspan="1"><p> Enter the name of the file you want to import, with or without the file path. For example: <span class="mt-font-courier-new"><em> folder\_name/file\_name </em></span></p></td></tr><tr><td colspan="1" rowspan="1"><p> File Name Match Type </p></td><td colspan="1" rowspan="1"><p> Specify whether the file you want to retrieve starts with or contains the text you entered under <b> File Name </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> File Compression Type </p></td><td colspan="1" rowspan="1"><p> Select the compression type for the file you want to retrieve. If the file is not compressed, select <b> None </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Select a File from ZIP Archive </p></td><td colspan="1" rowspan="1"><p> Select the ZIP file you want to import. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Add FileName Column </p></td><td colspan="1" rowspan="1"><p> Select <b> Yes </b> if you want a "*BATCH\_FILE\_NAME*" column to be added to your output data; otherwise select <b> No </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Select the Delimiting Character </p></td><td colspan="1" rowspan="1"><p> Select the delimiter used in the CSV file you want to retrieve. If your delimiter is not listed, select <b> Other </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Specify Your Delimiter (Conditional) </p></td><td colspan="1" rowspan="1"><p> Enter the character used to delimit your CSV text. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Quote Character </p></td><td colspan="1" rowspan="1"><p> Select a quote character to parse the CSV file you want to retrieve. A double quote (") is the CSV standard. If your desired quote character is not in the list, select <b> Other </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Custom Quote Character (Conditional) </p></td><td colspan="1" rowspan="1"><p> Enter the desired quote character. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Escape Character </p></td><td colspan="1" rowspan="1"><p> Select an escape character to parse the CSV file you want to retrieve. A backslash () is the CSV standard. If your desired escape character is not in the list, select <b> Other </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Custom Escape Character (Conditional) </p></td><td colspan="1" rowspan="1"><p> Enter the desired escape character. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Are Headers Present in CSV File? </p></td><td colspan="1" rowspan="1"><p> Select <b> Yes </b> if the CSV file you are importing contains headers; otherwise select <b> No </b>. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Enter Your Header Tag (Conditional) </p></td><td colspan="1" rowspan="1"><p> Enter the tag for the header in your JSON file. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Does Your JSON Text Require a Line Reader? </p></td><td colspan="1" rowspan="1"><p> Specify whether the text in your JSON file includes multiple lines that should be read. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Should the Backslash be Escaped? </p></td><td colspan="1" rowspan="1"><p> Specify whether the text in your JSON file contains backslash characters that should be escaped. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Enter your Sublist to Flatten (Optional) </p></td><td colspan="1" rowspan="1"><p> Enter the comma-separated sublists you want to flatten in your data. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Enter XPath Expression (Optional) </p></td><td colspan="1" rowspan="1"><p> Enter your XPath expression. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Do You Require Attributes in Data? </p></td><td colspan="1" rowspan="1"><p> Specify whether you require attributes values as part of your XML data. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Enter Your Data Tag (Optional) </p></td><td colspan="1" rowspan="1"><p> Enter the tag for the data in your JSON or XML file. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Enter Fields to Exclude (Optional) </p></td><td colspan="1" rowspan="1"><p> Provide a comma-separated list of fields to exclude in your JSON/XML import. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Sheet Name (Optional) </p></td><td colspan="1" rowspan="1"><p> Enter the sheet name you want to import from the specified Excel spreadsheet. Be sure to check the name for accidental spaces. If this field is left blank, the first sheet of the workbook will be used. </p></td></tr><tr><td colspan="1" rowspan="1"><p> File Password (Conditional) </p></td><td colspan="1" rowspan="1"><p> If your Excel file is password-protected, enter the file password. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Layout </p></td><td colspan="1" rowspan="1"><p> Select the layout of your Excel file. The following options are available: </p><ul><li><p><b> Column as Header </b>. Indicates that your Excel data uses a column-based layout (i.e. each column has a header). </p></li><li><p><b> Row as Header </b>. Indicates that your Excel data uses a row-based layout (i.e. each row has a header). </p></li><li><p><b> Cross Tab </b>. Indicates that your Excel data uses a cross-tab (pivot) layout. </p></li><li><p><b> Raw </b>. Indicates that your Excel data is raw (unformatted). </p></li><li><p><b> Advanced </b>. Use this option if you want to configure advanced layout options such as header and data start rows, footer rows to skip, date format, etc. </p></li></ul></td></tr><tr><td colspan="1" rowspan="1"><p> Mode </p></td><td colspan="1" rowspan="1"><p> Select how the cell range of your Excel data will be determined. If you select <b> Auto </b>, the range is determined automatically. If you select <b> Manual </b>, you will be asked to enter the column header and data ranges manually. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Enable Parsing for Large JSON Files? </p></td><td colspan="1" rowspan="1"><p> Specify whether parsing is enabled for large JSON files. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Column Header Range </p></td><td colspan="1" rowspan="1"><p> Enter the range for the column headers in your Excel sheet. For example: <span class="mt-font-courier-new"> A2:F8 </span></p></td></tr><tr><td colspan="1" rowspan="1"><p> Row Header Range </p></td><td colspan="1" rowspan="1"><p> Enter the range for the row headers in your Excel sheet. For example: <span class="mt-font-courier-new"> A2:A8 </span></p></td></tr><tr><td colspan="1" rowspan="1"><p> Data Range </p></td><td colspan="1" rowspan="1"><p> Enter the range for the data (non-header) cells in your Excel sheet. For example: <span class="mt-font-courier-new"> A3:F20 </span></p></td></tr><tr><td colspan="1" rowspan="1"><p> Header Start Row (Advanced only) (optional) </p></td><td colspan="1" rowspan="1"><p> Enter the header row number. If you do not enter a number, the first row is considered the header row. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Data Start Row (Advanced only) (optional) </p></td><td colspan="1" rowspan="1"><p> Enter the starting data row number. If you do not enter a number, the first row after the header row is considered the starting row. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Footer Rows to Skip (Advanced only) (optional) </p></td><td colspan="1" rowspan="1"><p> If there are one or more rows at the bottom of the file you do not want to import, enter the number of rows to skip. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Date Format (optional) </p></td><td colspan="1" rowspan="1"><p> Select the date format that should be used when converting date columns. (For Excel files, the date format specified for the cell will have higher precedence). </p></td></tr><tr><td colspan="1" rowspan="1"><p> Blank Rows (Advanced only) (optional) </p></td><td colspan="1" rowspan="1"><p> Select the desired outcome if blank rows are encountered in the Excel file. If you select <b> Skip blank rows </b>, the file is processed as normal without the blank rows. If you select <b> Stop at the first blank row </b>, everything is pulled up until the first blank row. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Empty Column Headers (Advanced only) (optional) </p></td><td colspan="1" rowspan="1"><p> Select the desired outcome if empty column headers are encountered in the Excel. If you select <b> Add </b><b> blank columns </b>, new columns are generated with default names applied. If you select <b> Stop at the first blank column </b>, everything is pulled up until the first column with an empty header. </p></td></tr></tbody></table>

### Other Panes

For information about the remaining sections of the connector interface, including how to configure scheduling, retry, and update options, see [Adding a DataSet Using a Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Connector").

## Troubleshooting

* Ensure that the file is present in the S3 bucket and that the correct file type is specified in the connector settings.
* NULL columns
  *must* be removed before the connector can successfully retrieve data.
* An unescaped character in the data file could cause the "Failed to execute import successfully" error. If your dataset has this error, you should check that the Quote Character in the Details section is correct.
