Search code examples
aws-cliamazon-quicksight

How to poll request status in aws-cli?


I am updating a QuickSight data source in my aws account.

aws quicksight update-data-source --cli-input-json file://update-stag-data-source-request.json --output json

And I get the following response:

{   
    "Status": 202,
    "Arn": "arn:aws:quicksight:eu-west-1:<my-aws-account-nr>:datasource/099676d0-99e3-44d7-b581-d6e532e72961",
    "DataSourceId": "099676d0-99e3-44d7-b581-d6e532e72961",
    "UpdateStatus": "UPDATE_IN_PROGRESS",
    "RequestId": "1d304a80-e507-46c3-acb3-237a58237e77"
}

So currently the status of this request is "UPDATE_IN_PROGRESS", but how do I track the status afterwards? I need to do it, because it seems that the update fails eventually, for reasons unknown. I know that, because I still see the old setup of the data source several minutes later. I believe, if I knew the eventual request status it would help me to debug the issue.


Solution

  • Check the command describe-data-source, it will return the DataSource.Status and, in case of any failure, you can check inside DataSource.ErrorInfo.Message.