IMPORT and EXPORT job bundles override help

I am trying to export and import a dashboard from source account to target account with all the dependencies.
I want to override the data source and don’t want the data source to be created new instead want to have the existing one in the target mapped. same for the vpc connections

is there a way how i can define the required data?

It’s not currently possible to override the datasource reference in the dataset using override parameter. You can however, override the VPC Connection ARN in the datasource to use an existing one in the target account.

One possible workaround is to manually update the dataset JSON file in the asset bundle file to replace the source datasource id with the target datasource id. You can also remove the datasource and VPC connection JSON files from the bundle file if you don’t intend to create them in the target account. The asset bundle file is just a plain zip file with .qs extension.

If you are planning to set up a CI/CD pipeline to deploy assets between the accounts, it might be easier to perform an one-time baseline from one account to the other, so that the resource ids will be in-synced.

How can we enter an existing vpc connection in the target account instead of creating the source vpc connection

For example, if you want to use an existing VPC Connection in the target account, you can pass the below in the OverrideParameters of the import API. You should also remove the vpc connection json file from the asset bundle file if it exists.

  "DataSources": [
      "DataSourceId": "<SOURCE_DATASOURCE_ID>",
      "VpcConnectionProperties": {
        "VpcConnectionArn": "<TARGET_ACCOUNT_VPC_CONNECTION_ARN>"

Please see the OverrideParameters structure here: