Troubleshooting Guide: SQL Server Error 12710 — Unsupported S3 URL Style
Why This Error Happens
This error occurs when SQL Server 2025’s S3 integration feature (used for BACKUP TO URL, BULK INSERT, or external data sources referencing S3-compatible object storage) receives an invalid value for the S3_URL_STYLE parameter. SQL Server 2025 only recognizes two valid addressing schemes — Path and Virtual_Hosted — and any other string (including typos, lowercase mismatches in older syntax expectations, or deprecated values like Host or Virtual) will cause the engine to reject the credential or external location object during validation. This is typically a configuration/syntax issue rather than a connectivity or permissions problem, since the error is thrown before SQL Server attempts to reach the S3 endpoint.
Step-by-Step Resolution Guide
Step 1: Locate the S3 URL Style Configuration
- Identify where the S3 URL style is being set — this is usually inside a
CREATE CREDENTIAL,CREATE EXTERNAL DATA SOURCE, orBACKUP ... TO URLT-SQL statement. - Run the following to inspect existing credentials:
SELECT name, credential_identity, target_type FROM sys.credentials;
- Check any PowerShell or
sqlcmdautomation scripts that may be passing theS3_URL_STYLEparameter programmatically.
Step 2: Correct the Parameter Value
- Edit the T-SQL statement so that
S3_URL_STYLEis set to exactly one of the two supported literal values (case-sensitive as documented):PathorVirtual_Hosted. - Example corrected syntax:
CREATE CREDENTIAL [s3://my-bucket.s3.amazonaws.com]
WITH IDENTITY = 'S3 Access Key',
SECRET = '<AccessKey>:<SecretKey>',
S3_URL_STYLE = 'Virtual_Hosted';
- If using
Pathstyle, confirm your S3-compatible endpoint (e.g., MinIO, Wasabi, AWS S3) actually supports path-style requests, as AWS has deprecated path-style for many newer buckets.
Step 3: Drop and Recreate the Credential or Data Source
- If the credential was already created with an invalid value, drop it before recreating it:
DROP CREDENTIAL [s3://my-bucket.s3.amazonaws.com];
- Recreate it using the corrected
S3_URL_STYLEvalue from Step 2. - Restart the SQL Server service only if the change was made at the instance-level configuration (not typically required for credential-level changes).
Step 4: Validate Endpoint Compatibility
- Confirm with your storage provider (AWS, MinIO, Azure-compatible gateway, etc.) which addressing style their endpoint expects.
- Update any firewall, proxy, or DNS configuration on Windows Server 2025 if switching from
PathtoVirtual_Hostedstyle, since virtual-hosted style requires DNS resolution ofbucket-name.s3.amazonaws.com.
Alternative or Verification Steps
- Test the fix by running a small
BACKUP DATABASE ... TO URLcommand against the S3 target and confirm it completes without throwing Error 12710. - If the error persists, enable extended events or check the SQL Server error log (
ERRORLOGinC:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) for the exact string passed toS3_URL_STYLE, ensuring no hidden whitespace or encoding issues exist in the script.