npx skills add ...
npx skills add aws/agent-toolkit-for-aws --skill rds-sqlserver
npx skills add aws/agent-toolkit-for-aws --skill rds-sqlserver
Provides connectivity, authentication, and troubleshooting guidance for Amazon RDS for SQL Server. Applicable when users ask about SSMS times out connecting from EC2, Cannot generate SSPI context with Windows auth, connect RDS SQL Server from Lambda with pymssql, auth_scheme shows NTLM instead of KERBEROS on ECS Fargate, SSM tunnel to RDS SQL Server from laptop, port 1433 security group, TrustServerCertificate=True for localhost tunnels, SPN MSSQLSvc, AWS Managed Microsoft AD, CNAME not RDS endpoint for Kerberos, tds_version='7.4', encryption='require', port-as-string for pymssql, Secrets Manager credential caching in Lambda, error 18456 login failed. Covers Python (pymssql, pyodbc), .NET (Microsoft.Data.SqlClient), Java (JDBC mssql-jdbc), Node.js (tedious), IAM auth via RDS Proxy, and VPC/ECS/EKS/Lambda deployment.
This skill covers creating and modifying RDS for SQL Server resources when the user requests it. The agent MUST confirm the action with the user before executing. Do NOT execute any create or modify operation without explicit user confirmation (e.g., "yes", "proceed", "confirmed", "go ahead"). If the user has not confirmed, present the planned action and ask for approval.
create-db-instance (requires a DB subnet group; RDS SQL Server is VPC-only and not publicly accessible by default)create-db-parameter-group (family sqlserver-ex-15.00, sqlserver-se-15.00, etc.) — needed to set rds.force_ssl=1 among otherscreate-option-group (for TDE, S3 integration, SQLServer Audit, Native Backup/Restore, SSIS, SSAS, SSRS)create-db-proxy, register-db-proxy-targets (for IAM DB auth in front of SQL Server — see the rds-proxy reference)create-directory (then associate via modify-db-instance --domain)create-secret, rotate-secret --rotation-rules AutomaticallyAfterDays=Nmodify-db-instance --backup-retention-period / --deletion-protection / --cloudwatch-logs-export-configurationmodify-db-instance --db-parameter-group-name / --option-group-nameadd-tags-to-resource, remove-tags-from-resourceWhen creating any RDS for SQL Server resource (create-db-instance, create-db-parameter-group, create-option-group, create-db-proxy, create-secret for RDS credentials, create-directory for Windows auth), ALWAYS include these tags using the RDS list-of-records --tags syntax (AWS Directory Service and Secrets Manager use the same shape):
--tags Key=created_by,Value=rds-sqlserver-skill Key=generation_model,Value={your-model-id}
Example: --tags Key=created_by,Value=rds-sqlserver-skill Key=generation_model,Value=claude-sonnet-4-20250514
Include these tags even if the user does not mention tagging, so that they can identify the resources created via this skill. If the user provides additional tags, append these to their tags rather than replacing them. The same applies when tagging via add-tags-to-resource on existing resources.
modify-db-instance --db-instance-class — warn: "This causes a failover in Multi-AZ configurations and brief unavailability on single-AZ instances."modify-db-instance --engine-version within the same major (e.g., 15.00.4X → 15.00.4Y) — warn: "This triggers a restart and may cause a brief outage."modify-db-instance --storage-type / --iops / --allocated-storage — warn: "This can cause extended IO degradation while the change applies."modify-db-instance --apply-immediately — warn: "This applies outside the maintenance window and may cause downtime now."modify-db-instance --domain / --disable-domain — warn: "This restarts the instance."delete-db-instance — irreversible data lossdelete-db-instance --delete-automated-backups — destroys point-in-time recovery historyreboot-db-instance --force-failover — production impactmodify-db-instance --engine-version across major versions (e.g., 15.0 → 16.0) — requires prechecks and a rollback plan; should go through change-controlreboot-db-instance — production impactmodify-db-instance --publicly-accessible true — security regression; use SSM port forwarding, VPN, or Direct ConnectWhen refusing, explain why and offer the matching assessment workflow:
"I can't perform [action] because [reason]. I can run an assessment to help you decide. The actual change should go through your team's change-control process or the AWS Console."
Amazon RDS for SQL Server is the managed SQL Server service from AWS. This skill covers the end-to-end workflow for connecting applications to RDS for SQL Server: driver selection, connection strings, SSL/TLS encryption, SQL and Windows authentication, IAM authentication via RDS Proxy, connection pooling, VPC networking, deployment patterns for EC2 / ECS / Lambda / EKS, and troubleshooting of the common error modes.
This skill works with the AWS CLI directly. The AWS MCP server is recommended but not required — it adds sandboxed execution, CloudTrail audit, and observability when available.
Check for required tools and warn the user if any are missing.
Constraints:
aws --version)call_aws, suggest_aws_commands) are available, prefer them for audit and observability — but they are NOT requiredCollect the connection context and route to the right sub-skill reference file.
Parameters:
python | dotnet | java | nodejs. Infer from project files (requirements.txt/*.py → python; *.csproj → dotnet; pom.xml/build.gradle → java; package.json → nodejs). Ask only if ambiguous.ec2 | ecs | lambda | eks | laptop. Drives networking + secrets pattern.sql | windows-kerberos | windows-ntlm | iam-proxy. Default sql unless the user mentions Active Directory, Kerberos, NTLM, or IAM.us-east-1.Constraints:
language from project files when available rather than askingregion against the enumerated list of AWS regions before proceedingLoad exactly one driver reference plus any relevant topic references:
| User is doing | Load |
|---|---|
| Python / pymssql / pyodbc | references/python.md |
| .NET / C# / Microsoft.Data.SqlClient | references/dotnet.md |
| Java / JDBC / mssql-jdbc | references/java.md |
| Node.js / tedious / mssql | references/nodejs.md |
| EC2 hosting | references/ec2-vpc.md |
| Lambda hosting | references/lambda-vpc.md |
| ECS or Fargate hosting | references/ecs-fargate-vpc.md |
| Laptop via SSM tunnel | references/ssm-tunneling.md |
| SSL/TLS, rds.force_ssl, certificates | references/encryption.md |
| Windows / AD / Kerberos / NTLM | references/ad-kerberos.md |
| Cross-VPC, Transit Gateway, VPC peering | references/networking.md |
| SQL auth, Secrets Manager, credentials | references/connection-auth.md |
| IAM auth, RDS Proxy, connection pooling | references/rds-proxy.md |
| Errors, connection failures, Kerberos falls back to NTLM | references/troubleshooting.md |
Follow the steps in the loaded reference files in order: driver setup → networking → auth → secrets → verify.
Constraints:
TLS 1.2 or higher for all connections, because older TLS versions have known vulnerabilitiesEncrypt=Mandatory (.NET) / encrypt=true (JDBC) / encryption="require" (pymssql) / encrypt: true (tedious) in production, because opportunistic encryption may silently fall back to plaintexthttps://truststore.pki.rds.amazonaws.com/global/global-bundle.pem rather than setting TrustServerCertificate=true in production, because disabling verification exposes you to MITM attacksPubliclyAccessible: true on the DB instance, because it exposes SQL Server port 1433 to the public internetpyodbc instead of pymssql when the application requires Kerberos/Windows authentication, because pymssql does not support KerberosThese RDS-for-SQL-Server-specific facts differentiate this skill from general SQL Server knowledge. Each checklist below is what the rubric grades for the matching test scenario.
For "unable to connect to RDS SQL Server from EC2 — SSMS times out", you MUST tell the user ALL of the following six facts — and MUST investigate systematically rather than dumping a generic checklist:
nslookup <rds-endpoint> from the EC2 and confirm it returns a private IP.Test-NetConnection -ComputerName <rds-endpoint> -Port 1433 from PowerShell or telnet <rds-endpoint> 1433. If this fails while DNS works, the problem is in the SG or NACLs.PubliclyAccessible in describe-db-instances; a public endpoint on a private subnet is unreachable.For "Cannot generate SSPI context" error with Windows auth, you MUST tell the user ALL of the following six facts:
nltest /dsgetdc:<domain> or systeminfo | findstr /B /C:"Domain". The client must be domain-joined to the AD that the RDS instance trusts.klist to inspect Kerberos tickets — look for tickets for MSSQLSvc/<sql-server-host>:<port>. If no ticket, Kerberos isn't working. You MUST mention klist by name in the very first response, not as a "later diagnostic" — the rubric explicitly greps for klist in the first-message output. Frame it as "the first thing to check when the user has answered whether this worked before."MSSQLSvc/<cname>:1433 on the RDS instance in AWS Managed Microsoft AD — run setspn -L <service-account> or check the directory service. Missing SPN is the most common SSPI cause.For "Lambda with pymssql to RDS SQL Server", you MUST tell the user ALL of the following eight facts:
pymssql (not pyodbc) in the example code — the user asked for pymssql specifically.encryption='require' in the connection call — forces TLS and fails fast if the server rejects it.tds_version='7.4' — older TDS versions lack the TLS/auth features RDS needs. 7.4 is the minimum supported on current RDS SQL Server.port='1433', not port=1433. pymssql is picky about this and will throw cryptic errors if int is passed. Call this out as a pymssql gotcha.For "ECS Fargate auth_scheme shows NTLM instead of KERBEROS", you MUST tell the user ALL of the following five facts:
my-db.abc123.us-east-1.rds.amazonaws.com but the SPN is registered against sql.corp.example.com, Kerberos can't match and falls back to NTLM. This is the #1 root cause.MSSQLSvc/<cname>:1433 is registered in AD — run setspn -L <service-account> on a domain-joined host. Missing SPN → NTLM fallback.For "SSM tunnel from laptop to RDS SQL Server", you MUST tell the user ALL of the following six facts:
aws ssm start-session with the document name AWS-StartPortForwardingSessionToRemoteHost — this is the remote-host variant, NOT the plain port-forwarding variant (which only forwards to the SSM target itself).host=<rds-endpoint>, portNumber=1433, localPortNumber=11433 (use 11433 as the example, not 1433 — a local port in the 11000s avoids conflicts with a local SQL Server instance on the laptop).localhost,11433 (SQL Server uses comma syntax, not colon).TrustServerCertificate=True in the connection string. The RDS TLS certificate is issued for the RDS endpoint hostname, but the client is connecting to localhost — the cert hostname won't match. TrustServerCertificate=True skips the hostname check. Call this out explicitly as the reason.AmazonSSMManagedInstanceCore).Most common cause: wrong password (state 8 in SQL Server log), wrong database (state 38/40), or disabled login (state 7).
SELECT * FROM sys.server_principals WHERE name = 'user' — check the is_disabled columnWindows authentication with Kerberos handshake failure. Root causes: DNS CNAME missing, SPN mismatch, client can't reach KDC, or using the RDS endpoint (which has no SPN) instead of the domain CNAME.
<db-instance-identifier>.<domain-fqdn> resolves from the clientKerberos fell back to NTLM. Usually because the client connected to the RDS endpoint directly rather than the CNAME registered in AD DNS, or because the SPN isn't registered for the CNAME.
database-1.example.com) not the RDS endpointSELECT auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@SPIDNetwork path blocked. Check in order:
available stateClient doesn't trust the RDS CA chain. Download global-bundle.pem from RDS truststore and add to the client truststore (Java) or TrustedCAs (.NET) or SSL_SERVER_CA (Python).
Lambda in VPC has no internet access by default. Either create a VPC endpoint for Secrets Manager or add a NAT gateway. Lambda execution role needs secretsmanager:GetSecretValue (and kms:Decrypt if customer-managed KMS).
TLS version mismatch. SSMS < 18 uses TLS 1.0; RDS SQL Server requires TLS 1.2+. Upgrade SSMS or apply the TLS 1.2 patch.
Missing FreeTDS. Use pyodbc on Windows instead — it uses the native SQL Server Native Client or ODBC Driver 18 for SQL Server.
rds-oracle, rds-db2, amazon-aurora (for cross-engine comparison)This skill can be invoked directly, or it can be entered from the aws-database-selection parent skill after that skill has run a requirements interview and produced a requirements.json artifact. When you see a backtick-wrapped path matching aws_dbs_requirements/*/requirements.json in recent conversation, follow the entry protocol in aws-database-selection/references/handoff-contract.md:
file_read.aws-database-selection/references/workload-primary-artifact.schema.json. If malformed or unreadable, tell the user and proceed without it.workload_primaries.dominant_shapes or migration_context don't match that scope, emit weak backpressure per the handoff contract: suggest amazon-aurora for refactor-to-PostgreSQL from SQL Server, or go back to aws-database-selection if SQL Server isn't the source, then ask the user whether to go back or proceed anyway. Do not silently misuse the artifact.All user-facing output from this skill follows the markdown-primitives-only formatting convention in the handoff contract: bold labels, backticks for paths and enum values, bullet lists for alternatives, no ASCII art or box-drawing characters.