Register Now


Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask a question.


Register Now

Lorem ipsum dolor sit amet, consectetur adipiscing elit.Morbi adipiscing gravdio, sit amet suscipit risus ultrices eu.Fusce viverra neque at purus laoreet consequa.Vivamus vulputate posuere nisl quis consequat.

How to create AWS QuickSight DataSource with AWS CLI

How to create AWS QuickSight DataSource with AWS CLI

Here are the AWS CLI commands to create a QuickSight data source:

1- First, create a JSON file with the input parameters for the create-data-source command. For example, if you want to create a Redshift data source, the JSON file might look like this:

  "DataSourceId": "my-data-source-id",
  "Name": "MyDataSource",
  "Type": "REDSHIFT",
  "DataSourceParameters": {
    "RedshiftClusterId": "my-redshift-cluster-id",
    "Database": "mydatabase",
    "ClusterUsername": "myusername",
    "ClusterPassword": "mypassword"
  "Credentials": {
    "CredentialPair": {
      "Username": "my-credential-username",
      "Password": "my-credential-password"
  "Permissions": [
      "Principal": {
        "Federated": "arn:aws:iam::1234567890:federated-user/myuser"
      "Actions": [
  "VpcConnectionProperties": {
    "VpcConnectionArn": "arn:aws:quicksight:us-east-1:1234567890:vpc-connection/my-vpc-connection"

2- Save the JSON file as a variable, such as $data_source_params.

3- Run the create-data-source command, passing in the $data_source_params variable as the input:

aws quicksight create-data-source --aws-account-id 1234567890 --namespace default --parameters "$data_source_params"

This will create a QuickSight data source with the specified parameters. The create-data-source command returns the ID of the newly created data source. You can use this ID to reference the data source in other QuickSight operations.

Note: The create-data-source command requires you to specify the AWS account ID and the namespace where the data source will be created. Make sure to replace the placeholder values in the example command with the actual values for your account and namespace.

ALSO READ  AWS CLI script that creates an AWS Lambda function:

About Abhay Singh

I'm Abhay Singh, an Architect with 9 Years of It experience. AWS Certified Solutions Architect.

Follow Me

Leave a reply