Important

The SingleStore 9.1 release candidate (RC) gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 9.0 is recommended for production workloads, which can later be upgraded to SingleStore 9.1.

ALTER LINK

Modifies an existing connection link.

The ALTER LINK command modifies an existing link in place by updating its configuration and/or credentials clause, without recreating the link or dependent objects such as pipelines or external functions. Any pipelines (paused/stopped) or operations using this link continue to function with the updated connection details and their cursor positions are preserved.

Syntax

ALTER LINK [database.]link_name
    <set_clause> [<set_clause>]

<set_clause>:
      SET CONFIG 'configuration_json'
    | SET CONFIG ::config_key = 'value'
    | SET CREDENTIALS 'credentials_json'
    | SET CREDENTIALS ::credential_key = 'value'

Note

Each ALTER LINK query can contain at most two SET clauses, provided that one is SET CONFIG and the other is SET CREDENTIALS.

Arguments

  • database: Name of the database that contains the link.

  • link_name: Name of the existing link to modify.

  • SET CONFIG 'configuration_json': Specifies the link configuration in JSON format. The specified configuration replaces the existing CONFIG clause.

  • SET CONFIG ::config_key = 'value': Updates or adds a single top-level configuration parameter (key) in the configuration JSON. If the parameter exists, it is updated; otherwise, a new parameter is added to the configuration.

  • SET CREDENTIALS 'credentials_json': Specifies the link credentials in JSON format. The specified credentials replace the existing CREDENTIALS clause.

  • SET CREDENTIALS ::credential_key = 'value': Updates or adds a single top-level credential parameter (key) in the credentials JSON. If the parameter exists, it is updated; otherwise, a new parameter is added to the credentials JSON.

Remarks

  • An empty JSON object, such as CONFIG '{}', clears the existing configuration.

  • Refer to Permissions Matrix for the required permissions.

  • If a pipeline that uses the link is currently running, it must be paused or stopped before running the ALTER LINK command. Otherwise, the ALTER LINK command will return an error.

  • After successfully running an ALTER LINK command, the SHOW CREATE LINK command returns the updated link definition.

Examples

The examples use the following link:

CREATE LINK analytics_link AS S3
CONFIG '{"disable_gunzip":false}'
CREDENTIALS '{"aws_access_key_id":"initial_key_id",
"aws_secret_access_key":"initial_secret"}';

Note: The output is formatted for readability.

  • Add a configuration parameter:

    ALTER LINK analytics_link
    SET CONFIG ::region = "us-east-1";
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"disable_gunzip\":false,\"region\":\"us-east-1\"}"
        CREDENTIALS <CREDENTIALS REDACTED>
  • Modify a single configuration parameter:

    ALTER LINK analytics_link
    SET CONFIG ::region = 'us-west-2';
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"disable_gunzip\":false,\"region\":\"us-west-2\"}"
        CREDENTIALS <CREDENTIALS REDACTED>
  • Replace the CONFIG JSON:

    ALTER LINK analytics_link
    SET CONFIG '{"region":"eu-central-1","disable_gunzip":true}';
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"region\":\"eu-central-1\",\"disable_gunzip\":true}"
        CREDENTIALS <CREDENTIALS REDACTED>
  • Modify a single credential parameter:

    ALTER LINK analytics_link
    SET CREDENTIALS ::aws_access_key_id = 'rotated_key_id';
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"region\":\"eu-central-1\",\"disable_gunzip\":true}"
        CREDENTIALS <CREDENTIALS REDACTED>
  • Replace the CREDENTIALS JSON:

    ALTER LINK analytics_link
    SET CREDENTIALS '{"aws_access_key_id":"final_key_id","aws_secret_access_key":"final_secret"}';
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"region\":\"eu-central-1\",\"disable_gunzip\":true}"
        CREDENTIALS <CREDENTIALS REDACTED>
  • Modify the CONFIG and CREDENTIAL JSON in the same ALTER LINK query:

    ALTER LINK analytics_link
    SET CONFIG '{"region":"eu-central-1","disable_gunzip":true}'
    SET CREDENTIALS '{"aws_access_key_id":"final_key_id","aws_secret_access_key":"final_secret"}';
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"region\":\"eu-central-1\",\"disable_gunzip\":true}"
        CREDENTIALS <CREDENTIALS REDACTED>
    -- Using a combination of JSON and single-key updates
    ALTER LINK analytics_link
    SET CONFIG '{"region":"us-west-2","disable_gunzip":true}'
    SET CREDENTIALS ::aws_access_key_id = 'rotated_key_id';
    SHOW CREATE LINK analytics_link \G
    Link Name: analytics_link
    Create Link: CREATE LINK `analytics_link` AS S3
        CONFIG "{\"disable_gunzip\":true,\"region\":\"us-west-2\"}"
        CREDENTIALS <CREDENTIALS REDACTED>

Last modified: March 10, 2026

Was this article helpful?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK

Try Out This Notebook to See What’s Possible in SingleStore

Get access to other groundbreaking datasets and engage with our community for expert advice.