- Newest
- Most votes
- Most comments
The issue you're experiencing with AWS SCT CLI failing to connect to Redshift while the UI connection succeeds with identical parameters could be due to several factors:
-
Authentication Method Differences: The CLI might be handling authentication differently than the UI. When connecting to Redshift, AWS SCT uses the password to connect only when you choose to connect to your database in a project. The CLI might require additional parameters or a different authentication approach.
-
Profile Configuration: The 'teradataprofile' you're using might not be properly recognized in CLI mode. Ensure that the AWS profile is correctly set up and accessible to the CLI process.
-
Connection Timeout: CLI operations might have different timeout settings compared to the UI. The "Connection wasn't established" error could indicate a timeout issue.
-
Special Characters in Credentials: As you suspected, special characters in passwords can sometimes cause issues in CLI mode due to how they're escaped or interpreted.
-
ODBC Driver Version Conflicts: There might be a version conflict between ODBC drivers. Some versions of ODBC drivers (1.x vs 2.x) don't allow connections to the same server/profile simultaneously.
Recommendations:
-
Try using a simpler password temporarily to rule out special character issues.
-
Check if there are any AWS credentials or profile conflicts. Ensure the profile is correctly configured and accessible.
-
If you're using IAM authentication, verify that all necessary permissions are in place for the CLI operation.
-
Enable more detailed logging by adding debug flags to your CLI commands if available.
-
Check if there are any VPC endpoints that might be required for the connection that the UI is using automatically but the CLI isn't.
-
Verify that the CLI is using the same ODBC driver version as the UI.
-
Try specifying the connection parameters directly in the command rather than relying on the profile to see if that makes a difference.
Sources
Unable to Connect to Redshift ODBC Database - Error HY000 | AWS re:Post
Glue Connection (Version 2) for redshift | AWS re:Post
Connecting Amazon Redshift with the AWS Schema Conversion Tool - AWS Schema Conversion Tool
I’ve run into this exact issue before when using AWS SCT CLI with Redshift — the most common culprit turned out to be how the CLI handles special characters in passwords or parameters compared to the UI. Even if your password works in the UI, certain characters (!, &, $, ^, etc.) may need to be escaped or quoted differently when passed through the command line.
A couple of things you can try:
Wrap your password and other string parameters in double quotes and escape any special characters (PowerShell in particular can interpret characters differently than the SCT UI).
Enable verbose logging by adding -loglevel: debug or setting the AWS_SCT_LOG_LEVEL=DEBUG environment variable before running the CLI — this gives much more detailed output and may reveal whether it’s failing during authentication or connection initialization.
Compare the sct-cli.log file with the UI logs in %USERPROFILE%\aws-schema-conversion-tool\logs. Sometimes the CLI log will show a slightly different JDBC URL or driver behavior that can help pinpoint the problem.
If none of that resolves it, I’d suggest checking the exact SCT CLI version/build you’re using — a few builds had known issues with Redshift CLI connections that were later fixed. Upgrading to the latest version often clears this up.
answered a year ago
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated 4 months ago
