August 2026 release is live Read More

Step 2: Create an IAM role for Mavvrik

Mavvrik supports both types of AWS authentication:

  1. Roles

  2. Users

Role-based access is generally considered to be more secure than user-based access, as it allows organizations to control access to resources and functions based on defined roles and responsibilities. We recommend using roles over individual users

Roles

  1. Login to AWS Member account you're trying to onboard as an Administrator if not already logged in. And navigate to IAM service using AWS search bar.

  2. On the IAM Console, Select Roles from the left menu, and click Create role.

  3. Select Custom trust policy

  4. Copy the JSON

    {
      "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": ["sts:AssumeRole"],
            "Principal": {
              "AWS": [
                "arn:aws:iam::911403356698:user/global-user-for-assume-role",
                "arn:aws:iam::911403356698:user/mavvrik-svc-user",
                "arn:aws:iam::911403356698:role/mavvrik-svc-role"
              ]
            },
            "Condition": {
              "StringEquals": {
                "sts:ExternalId": "<TENANT-ID>"
              }
            }
          }
        ]
    }
    
  5. Paste the copied JSON in Custom trust policy editor

    Paste the custom trust policy JSON
    Paste the custom trust policy JSON
  6. Remove <TENANT-ID>

Replace the tenant ID placeholder in the trust policy
Replace the tenant ID placeholder in the trust policy
  1. Enter your tenant id as shown image. To get the tenant id to follow instructions,

    1. Login to Mavvrik

    2. From the side menu, select API under the Admin section

    3. Capture the Tenant ID

  1. Click Next, on next screen for permissions, Choose 'AWS Managed - job function' in the filter. Search and select the listed policies below.

    • ReadOnlyAccess

    • ViewOnlyAccess

Select the required AWS managed policies
Select the required AWS managed policies

Choose 'AWS Managed in the filter. Search and select the listed policies below.

  • IAMReadOnlyAccess

  • CloudWatchReadOnlyAccess

  • ComputeOptimizerReadOnlyAccess

  • AWSOrganizationsReadOnlyAccess

  1. Click Next again & on a final page, enter a name to the role & click Create role

  2. Search for the newly created role

  3. Click on Add permissions → Create inline policy.

Start creating an inline policy for the IAM role
Start creating an inline policy for the IAM role
  1. Search for Cost Explorer Service

  2. Click on Write → StartSavingsPlansPurchaseRecommendationGenerationNext

Grant the Savings Plans recommendation permission
Grant the Savings Plans recommendation permission
  1. Enter the policy name.

  2. Click on Create policy.

Create the IAM role inline policy
Create the IAM role inline policy
  1. Once the role is created, please note the ARN of a role, which will be required in the next step.

Copy the new IAM role ARN
Copy the new IAM role ARN

OR use below permissions and create an inline policy for the newly created role

ReadOnlyAccess
ViewOnlyAccess
CloudWatchReadOnlyAccess
ComputeOptimizerReadOnlyAccess
AWSOrganizationsReadOnlyAccess

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowIAMReadOnlyActions",
            "Effect": "Allow",
            "Action": [
                "iam:SimulatePrincipalPolicy",
                "iam:GetAccountSummary"
            ],
            "Resource": "arn:aws:iam::<ACCOUNT_ID>:role/<ROLE_NAME>"
        },
        {
            "Sid": "DenyAllOtherIAMActions",
            "Effect": "Deny",
            "NotAction": [
                "iam:SimulatePrincipalPolicy",
                "iam:GetAccountSummary"
            ],
            "Resource": "arn:*:iam::*:*"
        }
    ]
}

Users

  1. Login to AWS Member account you're trying to onboard as an Administrator if not already logged in. And navigate to IAM service using AWS search bar.

  2. On the IAM Console, Select Users from the left menu

Open IAM Users
Open IAM Users
  1. Click on Create User

Start creating an IAM user
Start creating an IAM user
  1. Enter the Username & click Next.

Enter the IAM username
Enter the IAM username
  1. Select Attach policies directly, on next screen for permissions, please choose 'All Types' in the filter and select the listed policies below.

    • ReadOnlyAccess

    • ViewOnlyAccess

    • IAMReadOnlyAccess

    • CloudWatchReadOnlyAccess

    • ComputeOptimizerReadOnlyAccess

    • AWSOrganizationsReadOnlyAccess

or you can use below policies

ViewOnlyAccess
CloudWatchReadOnlyAccess
ComputeOptimizerReadOnlyAccess
AWSOrganizationsReadOnlyAccess

Select the required AWS managed policies for the user
Select the required AWS managed policies for the user
  1. Click Next again & on a final page, give a name to the role & click Create user

Create the IAM user
Create the IAM user
  1. Once the user is created, please click on the user to create a Secret Key

  2. Go to Security Credentials tab & Click on Create Access Key

Start creating an access key
Start creating an access key
  1. Select Application running outside AWS & Click on Next

Choose the application running outside AWS use case
Choose the application running outside AWS use case
  1. Click on Create access key.

Create the access key
Create the access key
  1. Secret Key will get generated.

  2. Copy the Access Key & Secret Key which will be required in the next step.

Copy the generated access key and secret key
Copy the generated access key and secret key
  1. Open newly created user

  2. Click on Add permissions → Create inline policy.

Open the newly created IAM user
Open the newly created IAM user
  1. Search for Cost Explorer Service

  2. Click on Write → StartSavingsPlansPurchaseRecommendationGenerationNext

Start creating an inline policy for the IAM user
Start creating an inline policy for the IAM user
  1. Enter the policy name.

  2. Click on Create policy.

Create the IAM user inline policy
Create the IAM user inline policy