> For the complete documentation index, see [llms.txt](https://daton-sarasanalytics.gitbook.io/daton/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daton-sarasanalytics.gitbook.io/daton/~/changes/1yNKwtXwaJMWImmUJtdv/integrations/data-sources/saas-integrations/amazon-marketing-streams.md).

# Amazon Marketing Streams

## Connect Amazon Marketing Streams on Daton

### Pre-Requisites

<figure><img src="/files/QQhXjOcrlX33FxHpNKyi" alt=""><figcaption></figcaption></figure>

#### Step 1: Login to AWS console

1. Sign in to AWS console and go to IAM (Identity and Access Management)

#### Step 2: Create a new role to access SQS (Amazon Simple Queue Service)

1. Select *Role* from Access Management menu and click *Create Role* button

<figure><img src="/files/w5KGv6aOcK3e8ThC5tgf" alt=""><figcaption><p>Create a new Role</p></figcaption></figure>

2\. Select *AWS cccount* for Trusted Entity Type and use Account Id: 214669062314&#x20;

<div><figure><img src="/files/DprBlIm1xOTmP3vkwHUp" alt=""><figcaption><p>Select AWS account while creating the role</p></figcaption></figure> <figure><img src="/files/8ICj5FQi1Q8GaJmGhBlr" alt=""><figcaption><p>Use Daton AWS account ID</p></figcaption></figure></div>

3\. Add *AmazonSQSFullAccess* permissions - Search for 'sqs' and select *AmazonSQSFullAccess* from the list. Full access is required as Daton would create and manage SQS programmatically, for each of the Ad profiles and marketplaces.

<figure><img src="/files/29zZMoPWf0x2Yr295c8t" alt=""><figcaption><p>Give Full Access to SQS</p></figcaption></figure>

4\. Name and create the role

<figure><img src="/files/PP9NReJg5F8jP2Z58MBK" alt=""><figcaption><p>Name the role</p></figcaption></figure>

<figure><img src="/files/3oa7ae1uQjjf5kQiAEx8" alt=""><figcaption><p>Create role</p></figcaption></figure>

#### Step 3: Update trust policy for the role

1. Click on the role that you created earlier. Go to *Trust Relationships* tab and click on *Edit Trust Policy* button&#x20;

<div><figure><img src="/files/L30pdtA8ilvli97ojSAm" alt=""><figcaption><p>Click on the new role</p></figcaption></figure> <figure><img src="/files/EcBqfmS4THrbbhzQcMlc" alt=""><figcaption><p>Edit trust policy</p></figcaption></figure></div>

2\. Replace existing policy with the following and save the policy

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::214669062314:user/DatonSQSAccess"
            },
            "Action": "sts:AssumeRole",
            "Condition": {}
        }
    ]
}
```

#### Step 4: Update SQS timeouts

1. Click on the SQS role and edit it
2. Update Maximum Session Duration to 12 Hours

<figure><img src="/files/YkbRf9Mvvw0TGnbTm2Ou" alt=""><figcaption><p>Update session duration</p></figcaption></figure>

### Create AMS integrations on Daton

Step 1: Copy Role ARN from Amazon AWS IAM

<figure><img src="/files/0R26knue5KXMZbMj6tO4" alt=""><figcaption><p>Role ARN</p></figcaption></figure>

Step 2: Fill integration details along with ARN&#x20;

Step 3: Select Ad accounts from the list and submit the configuration

Step 3: That's all! Daton will create queues, create subscriptions to streams, and manage queues &#x20;

**Note:** Subscriptions to streams can take up to 2 hours. You would be able to check status of subscriptions by editing the integration and navigating to subscription list page.&#x20;
