The basic way is to "Save As" in the Dashboard and save as a Analysis. Then change the Datasets in the "new" Analysis and save it again as a Dashboard. You can then repeat the process for each and every Dashboard you wish to create.
For a programmatic way try out the following:
aws quicksight create-dashboard --aws-account-id <Account ID> --dashboard-id <any ID> --name <any dashboard name> --source-entity file://createDashboard.json --region <region>
where the JSON is:
{
"SourceTemplate": {
"DataSetReferences": [
{
"DataSetPlaceholder": "placeholder", // Place holder you provided when creating the template.
"DataSetArn": "arn:aws:quicksight:us-east-2:<Account ID>:dataset/<Dataset ID>" // ARN of the data set
}
],
"Arn": "arn:aws:quicksight: ap-southeast-2:<Account A ID>:template/<Template ID>"
}
}
update the permission of the dashboard using, once it is created:
aws quicksight update-dashboard-permissions --aws-account-id <Account ID> --dashboard-id <new Dashboard ID> --grant-permissions file://permission.json
where permission.json is similar to below (to grant co-owner access to the dashboard):
[
{
"Principal": "arn:aws:quicksight:<region>:<Account ID>:user/default/<Quicksight user name>", // QuickSight user ARN who needs access to the dashboard
"Actions": ["quicksight:DescribeDashboard","quicksight:ListDashboardVersions","quicksight:UpdateDashboardPermissions","quicksight:QueryDashboard","quicksight:UpdateDashboard","quicksight:DeleteDashboard","quicksight:DescribeDashboardPermissions","quicksight:UpdateDashboardPublishedVersion"]
}
]
then create an Analysis from this dashboard, share it with other users via the QuickSight console.