Amazon RDS - MS SQL Creating DB


Advertisements

As a cloud platform AWS gives you very minimal number of steps to setup a DB in RDS. Creating a MSSQL DB can be done in three ways. Using AWS management console, AWS CLI or AWS API. We will look at each of these approaches one by one.

Using AWS management Console

AWS management console is the most convenient way to get started with RDS. You login to the AWS console using your AWS account details, locate the RDS service and then follow the steps shown below to create a MSm SQL DB instance.

Step-1

Select the MySQL db Engine form the console.

 create_mssql_step_1.JPG

Step-2

Specify the required DB details.

specify_db_details_step_2.jpg

Step-3

In this step you decide on the db instance class, amount of storage allocated also set the master password along with few other details.

db_settings_step_3.jpg

Stpe—4

This is the final step when you mention the vpc and security settings, encryption, backup options and log export etc. For brevity the screen shot has been shortened showing only the important options.

 mssql_creation_complete.JPG

Using CLI

To create a MSSQL DB instance by using the AWS CLI, call the create-db-instance command with the parameters below.

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

Using API

To create a MSSQL DB instance by using the Amazon RDS API, we call the CreateDBInstance action with the parameters as shown below.

https://rds.amazonaws.com/
    ?Action=CreateDBInstance
    &AllocatedStorage=250
    &BackupRetentionPeriod=3
    &DBInstanceClass=db.m1.large
    &DBInstanceIdentifier=mydbinstance
    &DBSecurityGroups.member.1=mysecuritygroup
    &DBSubnetGroup=mydbsubnetgroup
    &Engine=sqlserver-se
    &MasterUserPassword=masteruserpassword
    &MasterUsername=masterawsuser
    &SignatureMethod=HmacSHA256
    &SignatureVersion=4
    &Version=2014-10-31
    &X-Amz-Algorithm=AWS4-HMAC-SHA256
    &X-Amz-Credential=AKIADQK/20140305/us-west-1/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=d445654615b1522c5b2b37c13bsseb7575hdh45e209d4b3a064a3
Advertisements