How to update my user in Amazon QuickSight to ADMIN PRO?

2 minute read
Content level: Advanced
0

Allow AWS Users explore Generative BI with Amazon Q in QuickSight by upgrading the user to ADMIN_PRO

If you have a user in Amazon QuickSight and you want to use Generative BI with Amazon Q in QuickSight such as Data Stories or Asking and answering questions with Amazon Q in QuickSight you need READER_PRO, AUTHOR_PRO or ADMIN_PRO role in QuickSight.

There are 2 options to get this role:

  1. You can ask your QuickSight admin to grant these roles (please check the pricing ). The QuickSight admin can change roles in Admin User Interface of QuickSight
  2. Another option is to use QuickSight UpdateUser API (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateUser.html).

Here is an example for the case of IAM or QuickSight user management. You can run in cloud shell or adjust to your needs: use READER_PRO or AUTHOR_PRO instead or adjust for your SSO configuration.

#!/bin/bash
echo 'Upgrade user to ADMIN_PRO (only if you are in IAM or QuickSight mode, not in IdM / SSO mode)'

export account_id=$(aws sts get-caller-identity --query "Account" --output text)

export user=$(
    aws sts get-caller-identity --query "Arn" --output text\
     | cut -d / -f2- \
)
echo "User = '${user}'"

export email=$(
    aws quicksight list-users \
        --aws-account-id $account_id \
        --namespace default \
        --query "UserList[? UserName == '${user}'].[Email]" \
        --output text
)
echo "Email = '${email}'"

aws quicksight update-user \
    --user-name $user \
    --aws-account-id $account_id \
    --namespace default \
    --email $email \
    --role ADMIN_PRO

echo Done

Please check the pricing page and prerequisites before activation of this feature.