Use the Amazon Cost Explorer connector to analyze and optimize AWS cloud spending.
Integrating your application with Amazon Cost Explorer lets you use these operations in an automation. It exposes 6 actions, listed below. Add the connector from the Connections area, authenticate, then select its operations in the automation builder. Capabilities: actions.
Authentication
Before you begin, make sure you have the following information:
Connection name: a name that identifies this connection in UnifyApps, such as "MyAppAmazonCostExplorerIntegration".
Region (required): the AWS region of your resources, such as us-east-1. If your AWS console URL starts with https://us-east-1.console.aws.amazon.com, enter us-east-1.
Authentication type: Access Key, IAM Role or Instance Role.
The fields you fill in depend on the authentication type:
Access Key: enter the Access key ID and Secret access key of an IAM user (both required).
IAM Role: enter the ARN of an IAM role in the IAM Role field (required), and in External Id the external ID set on the role's trust relationship.
Instance Role: no keys are entered; the connection uses the IAM role of the environment that UnifyApps runs in. Use it only when UnifyApps runs inside your own AWS account.
Access Key Based Authentication
Sign in to the AWS Management Console.
Search for Users in the search bar at the top of the console and open Users in IAM (Identity and Access Management).
Click Create user and enter a user name.
Choose Attach policies directly and attach a policy that allows the AWS Cost Explorer read actions you need (such as ce:GetCostAndUsage and ce:GetCostForecast). Click Create user.
Open the new user, go to Security credentials and click Create access key.
Choose Command Line Interface as the use case, add a description tag and click Create access key.
Copy the access key ID and secret access key into the connection form. Store them securely; anyone with them can access your AWS account.
IAM Role Based Authentication
Sign in to the AWS Management Console and open IAM.
Select Roles and click Create role.
Under Trusted entity type, choose AWS account, select Another AWS account and enter the UnifyApps AWS account ID. Contact UnifyApps support to get it.
Check Require external ID and enter the external ID provided by UnifyApps. Enter the same value in the External Id field of the connection form.
Attach a policy that allows the AWS Cost Explorer read actions you need (such as ce:GetCostAndUsage and ce:GetCostForecast).
Enter a role name and description, and click Create role.
Open the role, copy its ARN and paste it into the IAM Role field of the connection form.
The screenshots below show the AWS console. First, the Retrieve access keys page that appears after you create an access key:


Next, the trusted entity settings of an IAM role: Another AWS account with Require external ID checked:


Finally, the IAM dashboard, where the account menu and the AWS Account panel show your own account details:


Actions
Action Name | Description |
|---|---|
Get cost and usage | Get cost and usage from AWS Cost Explorer |
Get cost and usage comparisons | Get cost and usage comparisons from AWS Cost Explorer |
Get cost and usage with resources | Get cost and usage with resource‑level breakdown from AWS Cost Explorer |
Get cost categories | Get cost categories from AWS Cost Explorer |
Get cost comparison drivers | Get cost comparison drivers between two time periods from AWS Cost Explorer |
Get cost forecast | Get cost forecast over the time period based on past costs from AWS Cost Explorer |