---
title: "Create the AWS IAM role with CloudFormation"
---

Run a CloudFormation stack that creates the IAM role SaaSify assumes in your AWS account, then copy the Role ARN and External ID from the stack's Outputs.

:::note[Before you start]
- **Role:** Publisher Admin
- **You need:** AWS Account Administrator access with **AdministratorAccess** and **AWSMarketplaceSellerFullAccess**, and a signed-in AWS console session. See [Before you connect AWS Marketplace](/connect-clouds/aws/prerequisites).
:::

SaaSify connects to AWS by assuming an IAM role in your account. You create that role by running a CloudFormation template (a "CFT") that SaaSify generates for you. There is one template for AWS Marketplace (offers, subscriptions, data feed) and one for ACE co-sell. Run the one you need for the capability you are connecting.

:::danger[Copy the External ID from the stack Outputs, not from the form]
The **Run CFT** popup generates a **new random External ID every time it opens**, and the configuration form pre-fills a **different** stored value. Neither is guaranteed to match the External ID baked into the role you just created. Always copy **`SaaSifyIAMRoleTrustExternalID`** and **`SaaSifyIAMRoleARN`** from the CloudFormation stack's **Outputs** tab, and paste those exact values into the SaaSify form. If you re-open **Run CFT** and run a new stack, the External ID changes again — so finish adding the configuration before you re-open it.
:::

## Open the template

:::steps
### Open the seller account's General Settings
Go to **Providers → Seller Accounts**, open your AWS account, and select **General Settings**.

### Select Run CFT on the destination you need
- For offers, subscriptions and the data feed, use **Marketplace EventBridge Target Destination**.
- For co-sell, use **ACE EventBridge Target Destination**.

Each row has a **Run CFT** button.

### Copy the link and open it in your AWS session
In the popup (**Instructions to Run CloudFormation Template**), sign in to the AWS account linked to your AWS Marketplace, then **Copy link** and open it in the same browser instance. The link opens the CloudFormation **Quick create** page.
:::

## Run the stack

:::steps
### Confirm the region
Make sure the region is **N. Virginia (us-east-1)**.

### Check the pre-filled parameters
These are populated for you: **Stack Name**, **SaaSify Environment Name**, **IAM Role Trusted Entity Principal** and **IAM Role Trusted Entity ExternalId**. For the ACE template you also see **ACE Environment Name** and **ACE EventBridge Target Destination**; for the Marketplace template you also see **Datafeed SNS Webhook URL** and **Marketplace EventBridge Target Destination**.

Confirm the destination URLs end with your correct **Seller Code** (shown in the seller account details).

### For the Marketplace stack, enter the data-feed ARNs
If you are connecting the seller data feed, paste the three values from your AWS Marketplace customer data storage setup: **Amazon S3 ARN**, **AWS KMS key ARN** and **SNS Topic ARN**. Leave the **Permissions** section empty — it is optional.

### Acknowledge and create
Under **Capabilities**, select **I acknowledge that AWS CloudFormation might create IAM resources with custom names**, then select **Create stack**. Wait for the status to reach **CREATE_COMPLETE**.
:::

## Copy the Outputs

:::steps
### Open the Outputs tab
On the completed stack, open the **Outputs** tab.

### Copy the Role ARN and External ID
Copy **`SaaSifyIAMRoleARN`** and **`SaaSifyIAMRoleTrustExternalID`**. For the Marketplace stack, also note **`DatafeedS3BucketName`** and **`MarketplaceAwsAccountID`**.

Keep these values — you paste them into SaaSify next.
:::

:::tip[What happens next]
The stack also creates the EventBridge connection and rule that push marketplace and co-sell events to SaaSify. See [Turn on EventBridge notifications](/connect-clouds/aws/eventbridge).
:::

## Next

::::cards
:::card[Add the AWS seller account]{href="/connect-clouds/aws/add-seller-account"}
Paste the ARN and External ID, select capabilities, validate and save.
:::
::::
