INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: AWS databases: design, comparison and connectivity

Cannot connect to RDS: endpoints, network, TLS and authentication

Troubleshoot RDS by following one attempt from a specific client to a specific destination and identifying the stage it reached. Establish the engine and endpoint, then distinguish DNS, network paths, TLS, database authentication and permissions. An available status alone does not establish application access.

What you will learn

Choose engine-appropriate connection settings and narrow the next investigation from observed stages.

Prerequisite

For readers familiar with RDS responsibilities and client/target roles. Observations are fictional. There is no live database probe or input for connection strings or credentials.

First identify the failed connection attempt

Information to correlate first
RecordDistinction
Engine and deploymentSQL Server/MySQL/PostgreSQL; writer/reader roles for Aurora
Client and timeApplication, in-VPC host or corporate computer; success elsewhere is not the same condition
Endpoint and configured portDNS name and instance/cluster endpoint type; avoid stale IPs or another port
Client settingsDriver, database name, authentication and TLS/certificate verification settings
Observed evidenceWhich of DNS, TCP, TLS, login and SQL operation was actually verified

Do not mix engine-specific connection settings

Connection and authentication distinctions
TargetCheckCommon confusion
RDS for SQL ServerConfigured endpoint/port, SQL Server client and supported SQL/Windows authenticationAWS console IAM permissions do not themselves establish a database login
RDS for MySQL / PostgreSQLCompatible client, database/user, configured port and TLS modeDo not reuse another engine’s client settings or database-name assumptions
An IAM DB authentication configurationSupported MariaDB/MySQL/PostgreSQL setup, database preparation, token and TLSNot every RDS engine uses the same authentication token
Ordinary Aurora clusterWriter for updates; suitable endpoints and DB permissions for readsA reader name is not authorization; account for the no-replica exception

The fictional cases below explicitly configure PostgreSQL on 5432, MySQL on 3306 and SQL Server on 1433. In a real environment, use the port configured on that target rather than inferring it from a product name. Reaching a management API or web console is also separate from a SQL connection.

Separate established facts from unknowns at each stage

Choose the next check from the observed stage
Choose the next check from the observed stage1: Destination and network — TCP alone does not establish login — TLS and DB login. 2: TLS and DB login — Operation permissions remain separate — Required DB operation12Destination andnetworkTLS and DB loginRequired DBoperationChoose the next check from the observed stage1: Destination and network — TCP alone does not establish login — TLS and DB login. 2: TLS and DB login — Operation permissions remain separate — Required DB operation12Destination andnetworkTLS and DBloginRequired DBoperation
  1. Destination and network → TLS and DB loginTCP alone does not establish login
  2. TLS and DB login → Required DB operationOperation permissions remain separate
Destination and network
Client, DNS, port and the return path.
TLS and DB login
Encryption, server identity and database authentication.
Required DB operation
SQL access with the chosen database and principal.
Do not infer later success from an earlier observation
ObservationEstablishedNot established
DNS resolvesAn address was obtained at this client/timeReachability or login to the intended DB
TCP opens on the same destination portThat attempt established TCPTLS validation, DB authentication or SELECT/UPDATE success
TLS certificate validation failsEvidence to investigate certificate/name/trust/client settingsWrong password or insufficient DB permissions
Database authentication is rejectedThat peer returned an authentication-stage responseCorrect database/user or successful business SQL
SELECT succeedsThis principal read that target successfullyPermission for other databases or UPDATE

Examples C1–C3: narrow the investigation from observations

These are fictional observations from different clients and engines. Example addresses are not live databases. Do not combine C1 DNS, C2 TLS failure and C3 login rejection into one supposedly successful attempt.

Correlate evidence from the same client, target and time
CaseConditions and observationsNext investigation
C1: PostgreSQLPrivate DB, port 5432. Corporate PC has no VPN/private path. DNS returns 10.8.1.20; TCP times outAuthorized private connectivity, source, routes, SG/NACL/client firewall; DNS is not proof of reachability
C2: MySQLIn-VPC app, port 3306. TCP succeeds to the same target; TLS hostname validation fails; no login attemptedEndpoint/certificate names, trusted CA and driver/TLS mode; do not begin by changing the DB password
C3: SQL ServerIn-VPC app, port 1433. TLS validation succeeds; DB rejects authentication. Console read access worksDB authentication method, login/user and selected DB; console IAM access is not DB authentication

Resolve the requirement rather than masking a failure

Match investigation and remediation to the cause
AvoidInvestigate instead
Enable public access or all-source rules before identifying the issueRequired clients, authorized paths and narrowly scoped controls on the target port
Disable certificate verification and declare successCorrect endpoint, CA, certificate identity and client/engine TLS conditions
Grant every DB privilegeThe required DB, principal and operation; separate authentication from authorization
Keep a pinned IP after a role transitionEndpoint DNS, caches, pools and reconnection behavior

A private DB can be reached from authorized in-VPC clients or designed private connectivity such as a VPN. Direct internet access is not a universal prerequisite for RDS. Determine the required scope with the environment owner when changing connectivity.

Continue with the engine-specific investigation

  1. Correlate engine, deployment, client, time, endpoint type and configured port.
  2. Record the DNS/TCP/TLS/login/operation stage reached by that same attempt.
  3. Inspect the relevant settings and engine-specific official documentation.
  4. Change only the required scope, then recheck connectivity and business operations under the same conditions.
  5. For SQL Server, continue to the SSMS/TLS and login/user lessons; for Aurora, check writer/reader roles.

Match observations to the next investigation

Choose an option to see the result and explanation.

C1 resolves a private IP but has no private path and TCP times out. Is DNS proof of connectivity?
Read the answer and reason

Answer: No; inspect authorized connectivity and controls. · Start at this client; this evidence does not isolate an SG as the sole cause.

C2 has TCP success but TLS hostname validation fails. Begin by changing the DB password?
Read the answer and reason

Answer: No; inspect endpoint, certificate identity, CA and TLS settings. · Choose the next check from the observed failure stage.

Does C3 console-read IAM permission itself establish a SQL Server database login?
Read the answer and reason

Answer: No; separately inspect DB authentication and login/user setup. · IAM management actions and database identity/permissions are separate.

Combine another PC’s TCP success with an app login error to declare the app fully verified?
Read the answer and reason

Answer: No; correlate evidence from the same attempt. · Do not transfer another client’s success to the app’s path or TLS.

Check, then explain in your own words

  1. Fix the client, engine, target and time.
  2. Separate observed stages from unknowns.
  3. Explain the next investigation for C1/C2/C3.
  4. After the required change, verify business outcomes under the same conditions.
Check your understanding: The TLS error disappeared. Is all application database access now verified?

Not yet. Separately establish successful TLS validation, database authentication, access to the selected database and the expected business result for the same client and target.

An improvement at an earlier stage does not prove success at later stages.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.