Cannot create SQL Server DB within Amazon RDS Instance

1

This seems to be a common question, however I haven't found a solution out there and many related questions are quite vague. Anyways, I am deploying an ASP.NET MVC 5 application to AWS using the AWS toolkit for Visual Studio Pro 2013. I have successfully published the app to Elastic Beanstalk with the exception of my database file which exists as a localDB database (.mdf). In trying to migrate this (very small) database I have created an RDS DB instance for SQL Server Express. My issue is that I cannot create a SQL Server DB which appears to be a common issue for VS users: I right click on the DB instance, select "Create SQL Server Database", VS is busy for a few moments and then nothing happens.

What I have done thus far:

  • I have an RDS instance created on a VPC with a security group that has an Inbound rule set to allow all traffic from my IP
  • I have an IAM user account with the following policies: PowerUserAccess, AmazonS3FullAccess, AmazonVPCFullAccess (I imagine some of this is redundant-I added additional policies to see if it was a permission issue)

So to succinctly state my questions, why is Visual Studio failing to create the SQL Server DB within the database instance? Or alternatively, is there a simpler method of migrating my database to AWS?

Just FYI, these are the references I have been using to deploy my application:

I'm brand new at AWS so let me know if clarification is needed.

Update: I checked the logs for my instance and I'm getting error logs

2014-12-12 18:16:02.72 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/AMAZONA-E3AJMJI ] for the SQL Server service. Windows return code: 0xffffffff, state: 53. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.

And

2014-12-12 18:47:23.72 Logon Error: 17806, Severity: 20, State: 14.

2014-12-12 18:47:23.72 Logon SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. The logon attempt failed [CLIENT: 113.108.150.211]

2014-12-12 18:47:23.73 Logon Error: 18452, Severity: 14, State: 1.

2014-12-12 18:47:23.73 Logon Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [CLIENT: 113.108.150.211]

UPDATE: Issue solved. We use a proxy server in my office which seemed to cause authentication with the RDS instance to fail, not allowing me to connect from my machine. I accepted Ossman's answer as I think it solves a lot of similar questions I've come across trying to solve this.

asp.net
sql-server
amazon-web-services
visual-studio-2013
asp.net-mvc-5
asked on Stack Overflow Dec 11, 2014 by scurrie • edited Dec 17, 2014 by scurrie

1 Answer

1

This is a AWS explorer for Visual Studio 2013 bug and actually occurs because you're using the "default security group" by default when you're creating your DB instance in RDS.

  1. Access the EC2 Service in AWS Management Console.

  2. Click on "Security Groups", and then on "Create Security Group"

  3. Give it a Name, Description and use "vpc-0846aa61" as VPC.

  4. And then add following rule for both "Inbound" and "OutBound" rules

Type: "All traffic"

Source (for Inbound): "Anywhere"

Destination (for Outbound): "Anywhere"

  1. Then Create the Security Group

  2. Go back to your DB Instance and then change the "default" security group to the one you just created. This is done by clicking "Instance Actions" and then "Modify".

Then you should be able to see following window when you right click on your instance in Visual Studio and clicking on "Create SQL Server Database":

enter image description here

My DB Instance:

enter image description here

answered on Stack Overflow Dec 12, 2014 by Osman Esen • edited Dec 12, 2014 by Osman Esen

User contributions licensed under CC BY-SA 3.0