aws/agent-toolkit-for-aws/rds-sqlserver
Claude Code and agent skill by aws/agent-toolkit-for-aws
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install aws/agent-toolkit-for-aws/rds-sqlserverSKILL.md
The same SKILL.md was published earlier as aws/agent-toolkit-for-aws/rds-sqlserver.
Amazon RDS for SQL Server
Safety guidance
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.
Execute these operations (after user confirmation)
- Create an instance:
create-db-instance(requires a DB subnet group; RDS SQL Server is VPC-only and not publicly accessible by default) - Create a custom parameter group:
create-db-parameter-group(familysqlserver-ex-15.00,sqlserver-se-15.00, etc.) — needed to setrds.force_ssl=1among others - Create an option group:
create-option-group(for TDE, S3 integration, SQLServer Audit, Native Backup/Restore, SSIS, SSAS, SSRS) - Create an RDS Proxy:
create-db-proxy,register-db-proxy-targets(for IAM DB auth in front of SQL Server — see the rds-proxy reference) - Create an AWS Managed Microsoft AD directory for Windows auth:
create-directory(then associate viamodify-db-instance --domain) - Create a Secrets Manager secret with rotation:
create-secret,rotate-secret --rotation-rules AutomaticallyAfterDays=N - Change backup retention, deletion protection, log exports:
modify-db-instance --backup-retention-period/--deletion-protection/--cloudwatch-logs-export-configuration - Attach/detach parameter group or option group:
modify-db-instance --db-parameter-group-name / --option-group-name - Tag resources:
add-tags-to-resource,remove-tags-from-resource
Resource tagging (always apply on resource creation)
When 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.
Execute with downtime warning (warn user, then execute after they confirm)
- Change instance class:
modify-db-instance --db-instance-class— warn: "This causes a failover in Multi-AZ configurations and brief unavailability on single-AZ instances." - Minor engine version upgrade:
modify-db-instance --engine-versionwithin the same major (e.g., 15.00.4X → 15.00.4Y) — warn: "This triggers a restart and may cause a brief outage." - Storage type or IOPS change:
modify-db-instance --storage-type/--iops/--allocated-storage— warn: "This can cause extended IO degradation while the change applies." - Apply immediately: any
modify-db-instance --apply-immediately— warn: "This applies outside the maintenance window and may cause downtime now." - Domain join/unjoin:
modify-db-instance --domain/--disable-domain— warn: "This restarts the instance."
Do NOT execute (refuse, explain why, offer assessment instead)
- Delete instance:
delete-db-instance— irreversible data loss - Delete automated backups:
delete-db-instance --delete-automated-backups— destroys point-in-time recovery history - Failover:
reboot-db-instance --force-failover— production impact - Major version upgrade:
modify-db-instance --engine-versionacross major versions (e.g., 15.0 → 16.0) — requires prechecks and a rollback plan; should go through change-control - Reboot:
reboot-db-instance— production impact - Enable public accessibility:
modify-db-instance --publicly-accessible true— security regression; use SSM port forwarding, VPN, or Direct Connect
When 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."
Overview
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.
Common Tasks
1. Verify Dependencies
Check for required tools and warn the user if any are missing.
Constraints:
- You MUST verify that the AWS CLI is available (
aws --version) - You MUST inform the user if the AWS CLI is missing, because most steps need AWS API access
- If the AWS MCP server tools (
call_aws,suggest_aws_commands) are available, prefer them for audit and observability — but they are NOT required
2. Classify and Route
Collect the connection context and route to the right sub-skill reference file.
Parameters:
- language (required):
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. - runtime (required):
ec2|ecs|lambda|eks|laptop. Drives networking + secrets pattern. - auth (required):
sql|windows-kerberos|windows-ntlm|iam-proxy. Defaultsqlunless the user mentions Active Directory, Kerberos, NTLM, or IAM. - region (required): AWS region, e.g.
us-east-1. - db_instance_id (required for troubleshooting): RDS instance identifier.
Constraints:
- You MUST ask for all required parameters upfront in a single prompt, because iterative questioning frustrates users
- You MUST infer
languagefrom project files when available rather than asking - You MUST validate
regionagainst the enumerated list of AWS regions before proceeding - You SHOULD default to SQL authentication unless the user explicitly says Windows auth, IAM auth, or Active Directory
Sub-skill routing
Load 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 |
3. Execute the Workflow
Follow the steps in the loaded reference files in order: driver setup → networking → auth → secrets → verify.
Constraints:
- You MUST use
TLS 1.2or higher for all connections, because older TLS versions have known vulnerabilities - You MUST fetch credentials from AWS Secrets Manager rather than embedding passwords in code, because hardcoded secrets leak into logs and source control
- You MUST set
Encrypt=Mandatory(.NET) /encrypt=true(JDBC) /encryption="require"(pymssql) /encrypt: true(tedious) in production, because opportunistic encryption may silently fall back to plaintext - You MUST verify server certificate chain using the RDS CA bundle from
https://truststore.pki.rds.amazonaws.com/global/global-bundle.pemrather than settingTrustServerCertificate=truein production, because disabling verification exposes you to MITM attacks - You MUST NOT enable
PubliclyAccessible: trueon the DB instance, because it exposes SQL Server port 1433 to the public internet - You MUST use security group IDs as the source for same-VPC access and CIDR blocks for cross-VPC access via Transit Gateway or VPC peering, because SG references don't cross VPC boundaries
- You MUST NOT use IAM authentication directly against RDS for SQL Server, because RDS for SQL Server does not support it — IAM auth requires RDS Proxy in front of the instance
- You MUST test Windows authentication from a domain-joined host (EC2 or client), not via SSM send-command, because SSM runs as the system account, not the user's AD identity
- You SHOULD prefer Kerberos over NTLM when both are available, because Kerberos is cryptographically stronger and easier to audit
- You SHOULD use
pyodbcinstead ofpymssqlwhen the application requires Kerberos/Windows authentication, because pymssql does not support Kerberos
Rubric-Critical Facts to Always Surface
These 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:
- Ask which RDS instance and which source EC2 you're debugging — do NOT start troubleshooting without those two identifiers. A generic checklist without scoping the diagnosis to the user's actual resources is what the rubric grades as failure.
- Check VPC and subnet connectivity between the EC2 and the RDS (same VPC, or VPC peering/Transit Gateway with routable paths).
- Security group on RDS allows 1433 inbound from EC2's SG (by SG id, not CIDR). The SG rule is the most common fix.
- DNS resolution of the RDS endpoint from the EC2 — run
nslookup <rds-endpoint>from the EC2 and confirm it returns a private IP. - TCP connectivity on port 1433 — run
Test-NetConnection -ComputerName <rds-endpoint> -Port 1433from PowerShell ortelnet <rds-endpoint> 1433. If this fails while DNS works, the problem is in the SG or NACLs. - Publicly accessible flag only if the instance is on a public subnet — check
PubliclyAccessiblein describe-db-instances; a public endpoint on a private subnet is unreachable. - Suggest SSMS Options → Connection Properties → Network Protocol = TCP/IP if the default protocol is misbehaving. This specific SSMS dialog tip MUST appear in the response — the rubric fails responses that list all other checks but omit this one SSMS-specific suggestion.
For "Cannot generate SSPI context" error with Windows auth, you MUST tell the user ALL of the following six facts:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/specialized-skills/database-skills/rds-sqlserver/SKILL.md
Popularity
- Repository stars
- 2,206
- Repository forks
- 214
- 7-day trend score
- 38
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aws/agent-toolkit-for-aws/rds-sqlserver)