后端与数据库

rds-sqlserver

aws/agent-toolk…-for-aws

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.

  • 4753 次安装
  • 3300 星标
  • 收录于

安装命令

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill rds-sqlserver

SKILL.md

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 (family sqlserver-ex-15.00, sqlserver-se-15.00, etc.) — needed to set rds.force_ssl=1 among 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 via modify-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)