Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Creating a DB Instance Running the Microsoft SQL Server Database Engine

The basic building block of Amazon RDS is the DB instance. Your Amazon RDS DB instance is similar to your on-premises Microsoft SQL Server. After you create your SQL Server DB instance, you can add one or more custom databases to it.

Important

You must complete the tasks in the Setting Up for Amazon RDS section before you can create or connect to a DB instance.

For an example that walks you through the process of creating and connecting to a sample DB instance, see Creating a Microsoft SQL Server DB Instance and Connecting to a DB Instance.

AWS Management Console

To launch a SQL Server DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the top right corner of the Amazon RDS console, choose the region in which you want to create the DB instance.

  3. In the navigation pane, choose Instances.

  4. Choose Launch DB Instance to start the Launch DB Instance Wizard.

    The wizard opens on the Select Engine page. The SQL Server editions that are available vary by region.

    
						Engine selection
  5. In the Select Engine window, choose the SQL Server icon and then choose the Select button for the SQL Server DB engine edition that you want to use. The SQL Server editions that are available vary by region.

  6. The Production? step asks if you are planning to use the DB instance you are creating for production. If you are, choose Yes. If you choose Yes, the failover option Multi-AZ and the Provisioned IOPS storage option will be preselected in the following step. We recommend these features for any production environment.

  7. Choose Next to continue. The Specify DB Details page appears.

    
						DB instance details
  8. On the Specify DB Details page, specify your DB instance information.

    For This Parameter Do This

    License Model

    Choose the license model you want to use. Choose license-included to use the general license agreement for Microsoft SQL Server. Choose bring-your-own-license to use your existing license.

    To use the Bring Your Own License model, you must provide your Microsoft License Mobility Agreement information in the External Licenses section of the Amazon RDS console.

    For more information, see Providing External License Information.

    DB Engine Version

    Choose the version of Microsoft SQL Server you want to use.

    DB Instance Class

    Choose a configuration for your DB instance. For example, a db.m1.small instance class equates to 1.7 GB memory, 1 ECU (1 virtual core with 1 ECU), 64-bit platform, and moderate I/O capacity.

    If possible, choose an instance class large enough that a typical query working set can be held in memory. When working sets are held in memory the system can avoid writing to disk, and this improves performance.

    For more information, see DB Instance Class and DB Instance Class Support for Microsoft SQL Server.

    Time Zone

    Choose a time zone for your DB instance. If you don't choose a time zone, your DB instance uses the default time zone.

    For more information, see Local Time Zone for Microsoft SQL Server DB Instances.

    Multi-AZ Deployment

    Choose Yes to have a standby mirror of your DB instance created in another Availability Zone for failover support. We recommend Multi-AZ for production workloads to maintain high availability. For development and testing, you can choose No.

    For more information, see Multi-AZ Deployments for Microsoft SQL Server with Database Mirroring.

    Storage Type

    Choose the storage type you want to use.

    For more information, see Amazon RDS Storage Types.

    Allocated Storage

    Type a value to allocate storage for your DB instance (in gigabytes). In some cases, allocating a higher amount of storage for your DB instance than the size of your database can improve I/O performance.

    For more information, see Storage for Amazon RDS.

    DB Instance Identifier

    Type a name for the DB instance. Name your DB instances in the same way that you would name your on-premises servers. Your DB instance identifier must contain 15 alphanumeric characters or less, and must be unique for your account in the region you chose. You can add some intelligence to the name, such as including the region and DB engine you chose, for example sqlsv-instance1.

    Master Username

    Type a name that you will use as the master user name to log on to your DB Instance with all database privileges. The master user name is a SQL Server Authentication login that is a member of the processadmin, public, and setupadmin fixed server roles.

    Master User Password and Confirm Password

    Type a password that contains from 8 to 128 printable ASCII characters (excluding /,", a space, and @) for your master user password. Retype the password in the Confirm Password box.

  9. Choose Next to continue. The Configure Advanced Settings page appears.

    
						Additional Configuration panel
  10. On the Configure Advanced Settings page, provide additional information that Amazon RDS needs to launch the SQL Server DB instance.

    For This Parameter Do This

    VPC

    This setting depends on the platform you are on. If you are a new customer to AWS, choose the default VPC shown. If you are creating a DB instance on the previous E2-Classic platform that does not use a VPC, choose Not in VPC.

    For more information, see Amazon Virtual Private Cloud (VPCs) and Amazon RDS.

    Subnet Group

    This setting depends on the platform you are on. If you are a new customer to AWS, choose default, which will be the default DB subnet group that was created for your account. If you are creating a DB instance on the previous E2-Classic platform and you want your DB instance in a specific VPC, choose the DB subnet group you created for that VPC.

    Publicly Accessible

    Choose Yes to give the DB instance a public IP address, meaning that it will be accessible outside the VPC (the DB instance also needs to be in a public subnet in the VPC); otherwise, choose No, so the DB instance will only be accessible from inside the VPC.

    For more information, see Hiding a DB Instance in a VPC from the Internet.

    Availability Zone

    Use the default value of No Preference unless you want to specify an Availability Zone.

    For more information, see Regions and Availability Zones.

    VPC Security Group

    If you are a new customer to AWS, choose the default VPC. Otherwise, choose the VPC security group you previously created.

    For more information, see Working with DB Security Groups.

    Database Port

    Specify a port you want to access the database through. SQL Server installations default to port 1433. If you use a DB security group with your DB instance, this must be the same port value you provided when creating the DB security group.

    Important

    You cannot change the port once you create the DB instance, so it is very important that you determine the correct port to use to access the DB instance.

    DB Parameter Group

    Choose a DB parameter group. You can choose the default parameter group or you can create a parameter group and choose that parameter group.

    For more information, see Working with DB Parameter Groups.

    Option Group

    Choose an option group. You can choose the default option group or you can create an option group and choose that option group.

    For more information, see Working with Option Groups.

    Copy Tags To Snapshots

    Select this option to have any DB instance tags copied to a DB snapshot when you create a snapshot.

    For more information, see Tagging Amazon RDS Resources.

    Enable Encryption

    Choose Yes to enable encryption at rest for this DB instance.

    For more information, see Encrypting Amazon RDS Resources.

    Backup Retention Period

    Set the number of days you want automatic backups of your database to be retained. For any non-trivial instance, you should set this value to 1 or greater.

    For more information, see Working With Backups.

    Backup Window

    Unless you have a specific time that you want to have your database backup, use the default of No Preference.

    For more information, see Working With Backups.

    Enable Enhanced Monitoring

    Choose Yes to enable gathering metrics in real time for the operating system that your DB instance runs on.

    For more information, see Enhanced Monitoring.

    Auto Minor Version Upgrade

    Choose Yes to enable your DB instance to receive minor DB engine version upgrades automatically when they become available.

    Maintenance Window

    Choose the 30 minute window in which pending modifications to your DB instance are applied. If you the time period doesn't matter, choose No Preference.

    For more information, see Amazon RDS Maintenance Window.

  11. Choose Launch DB Instance.

  12. On the final page of the wizard, choose Close.

  13. On the RDS console, the new DB instance appears in the list of DB instances. The DB instance has a status of creating until the DB instance is ready to use. When the state changes to available, you can connect to the DB instance. Depending on the DB instance class and the amount of storage, it can take up to 20 minutes before the new instance is available.

    
						My DB instances list

CLI

To create a DB instance running the Microsoft SQL Server database engine, use the AWS CLI create-db-instance command with the following parameters:

  • --db-instance-identifier

  • --db-instance-class

  • --db-security-groups

  • --db-subnet-group

  • --engine

  • --master-user-name

  • --master-user-password

  • --allocated-storage

  • --backup-retention-period

Example

For Linux, OS X, or Unix:

Copy
aws rds create-db-instance --db-instance-identifier mymsftsqlserver / --allocated-storage 250 / --db-instance-class db.m1.large / --db-security-groups mydbsecuritygroup / --db-subnet-group mydbsubnetgroup / --engine sqlserver-se / --master-user-name masterawsuser / --master-user-password masteruserpassword / --backup-retention-period 3

For Windows:

Copy
aws rds create-db-instance ^ --db-instance-identifier mymsftsqlserver ^ --allocated-storage 250 ^ --db-instance-class db.m1.large ^ --db-security-groups mydbsecuritygroup ^ --db-subnet-group mydbsubnetgroup ^ --engine sqlserver-se ^ --master-user-name masterawsuser ^ --master-user-password masteruserpassword ^ --backup-retention-period 3

This command should produce output similar to the following:

Copy
DBINSTANCE mymsftsqlserver db.m1.large sqlserver-se 250 sa creating 3 **** n 10.50.2789 SECGROUP default active PARAMGRP default.sqlserver-se-10.5 in-sync

API

To create a DB instance running the Microsoft SQL Server database engine, use the Amazon RDS API CreateDBInstance action with the following parameters:

  • AllocatedStorage = 250

  • BackupRetentionPeriod = 3

  • DBInstanceClass = db.m1.large

  • DBInstanceIdentifier = mymsftsqlserver

  • DBSecurityGroups

  • DBSubnetGroup = mydbsubnetgroup

  • Engine = sqlserver-se

  • MasterUsername = masterawsuser

  • MasterUserPassword = masteruserpassword

Example

Copy
https://rds.amazonaws.com/ ?Action=CreateDBInstance &AllocatedStorage=250 &BackupRetentionPeriod=3 &DBInstanceClass=db.m1.large &DBInstanceIdentifier=mymsftsqlserver &DBSecurityGroups.member.1=mysecuritygroup &DBSubnetGroup=mydbsubnetgroup &Engine=sqlserver-se &MasterUserPassword=<masteruserpassword> &MasterUsername=<masterawsuser> &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2013-09-09 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140305/us-west-2/rds/aws4_request &X-Amz-Date=20140305T185838Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=b441901545441d3c7a48f63b5b1522c5b2b37c137500c93c45e209d4b3a064a3

Related Topics