Configure Windows authentication for Amazon RDS for Microsoft SQL Server using AWS Managed Microsoft AD
Ramesh Babu Donti, Amazon Web Services
Summary
This pattern shows how to configure Windows authentication for an Amazon Relational Database Service (Amazon RDS) for SQL Server instances using AWS Directory Service for Microsoft Active Directory (AWS Managed Microsoft AD). Windows authentication allows users to connect to the RDS instance using their domain credentials instead of database-specific usernames and passwords.
You can enable Windows authentication either when creating a new RDS SQL Server database or by adding it to an existing database instance. The database instance integrates with AWS Managed Microsoft AD to provide centralized authentication and authorization for domain users accessing the SQL Server database.
This configuration enhances security by leveraging existing Active Directory infrastructure and eliminates the need to manage separate database credentials for domain users.
Prerequisites and limitations
Prerequisites
An active AWS account with appropriate permissions
A virtual private cloud (VPC) with the following:
Configured Internet gateways and route tables
NAT gateways in public subnets (if internet access is required for instances)
AWS Identity and Access Management (IAM) roles:
A domain role with the following AWS managed policies:
AmazonSSMManagedInstanceCoreto enable AWS Systems ManagerAmazonSSMDirectoryServiceAccessto provide permissions to join instances to directories
An RDS enhanced monitoring role (if enhanced monitoring is enabled)
Security groups:
Directory service security group to allow Active Directory communication ports
An Amazon Elastic Compute Cloud (Amazon EC2) security group to allow RDP
3389and domain communicationsAn RDS security group to allow SQL Server port
1433from authorized sources
Network connectivity:
Proper DNS resolution and network connectivity between subnets
Limitations
For information about AWS Regions that support AWS Managed Microsoft AD with RDS for SQL Server, see Region and version availability.
Some AWS services aren’t available in all AWS Regions. For Region availability, see AWS services by Region
. For specific endpoints, see the Service endpoints and quotas page, and choose the link for the service.
Architecture
Source technology stack
An on-premises Active Directory or AWS Managed Microsoft AD
Target technology stack
Amazon EC2
Amazon RDS for Microsoft SQL Server
AWS Managed Microsoft AD
Target architecture

The architecture includes the following:
An IAM role that joins the Amazon EC2 instance to the AWS Managed Microsoft AD domain.
An Amazon EC2 Windows instance for database administration and testing.
An Amazon VPC with a private subnet to host the Amazon RDS instance and internal resources across Availability Zones.
Security groups for network access control:
An Amazon RDS security group to control inbound access to SQL Server port
1433from authorized sources.An Amazon EC2 security group to manage RDP access through port
3389and domain communication ports.A Directory Services security group for Active Directory communications through ports
53,88,389, and445.
AWS Managed Microsoft AD to provide centralized authentication and authorization services for Windows resources.
An Amazon RDS for SQL Server database instance in the private subnet with Windows authentication enabled.
Tools
AWS services
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the AWS Cloud. You can launch as many virtual servers as you need and quickly scale them up or down.
Amazon Relational Database Service (Amazon RDS) helps you set up, operate, and scale a relational database in the AWS Cloud.
AWS Directory Service provides multiple ways to use Microsoft Active Directory (AD) with other AWS services such as Amazon Elastic Compute Cloud (Amazon EC2), Amazon Relational Database Service (Amazon RDS) for SQL Server, and Amazon FSx for Windows File Server.
AWS Directory Service for Microsoft Active Directory enables your directory-aware workloads and AWS resources to use Microsoft Active Directory in the AWS Cloud.
AWS Identity and Access Management (IAM) helps you securely manage access to your AWS resources by controlling who is authenticated and authorized to use them.
Other services
Microsoft SQL Server Management Studio (SSMS)
is a tool for managing SQL Server, including accessing, configuring, and administering SQL Server components.
Best practices
For general best practices, see Best practices for Amazon RDS.
Epics
| Task | Description | Skills required |
|---|---|---|
Set up the directory type. |
| DBA, DevOps engineer |
Configure directory information. | In the Directory information section, enter the required information, and keep the optional values:
| DBA, DevOps engineer |
Configure the VPC and subnets. |
| DBA, DevOps engineer |
Review and create the directory. |
| DBA, DevOps engineer |
| Task | Description | Skills required |
|---|---|---|
Configure an AMI for Windows. |
| DBA, DevOps engineer |
Configure network settings. |
| DBA, DevOps engineer |
Configure storage. | Configure the Amazon EBS volumes as needed. | DBA, DevOps engineer |
Configure advanced details and launch the instance. |
| DBA, DevOps engineer |
| Task | Description | Skills required |
|---|---|---|
Create a database and configure engine options. |
| DBA, DevOps engineer |
Choose a template. | Choose a sample template that meets your requirements. | DBA, DevOps engineer |
Configure database settings. |
| DBA, DevOps engineer |
Configure the instance. | In the Instance configuration section, under DB instance class, select an instance size that meets your requirements. | DBA, DevOps engineer |
Configure storage. |
| DBA, DevOps engineer |
Configure connectivity. |
| DBA, DevOps engineer |
Configure Windows authentication. |
| DBA, DevOps engineer |
Configure monitoring. |
Note: Metrics are useful when you want to see how different processes or threads use the CPU. You can also export error logs to Amazon CloudWatch if Error log is enabled. | DBA, DevOps engineer |
Configure additional settings. |
| DBA, DevOps engineer |
Review costs and create database. | Review the Estimated monthly costs section, and then choose Create database. | DBA, DevOps engineer |
| Task | Description | Skills required |
|---|---|---|
Connect to the Windows machine. | Connect to your Windows machine and launch SQL Server Management Studio.
| DBA, DevOps engineer |
Configure the SSMS connection. | Set up the database connection using Windows authentication.
| DBA, DevOps engineer |
Configure security settings. | Set the required security parameters for SSMS version 20 or later.
| DBA, DevOps engineer |
Create a Windows login. |
| DBA, DevOps engineer |
Test Windows authentication. |
| DBA, DevOps engineer |