我正在尝试使用“发布到 AWS”功能通过 .NET SDK 将我的 Web 应用程序上传到 EC2 实例。对于我的其他 Web 应用程序,这非常有效!我可以看到两者之间的唯一区别是这个 Web 应用程序有一个连接字符串,连接到已经存在的附加 RDS 实例。
当发布确实通过时,实例启动并且似乎运行良好。在大约十分钟内,实例回滚并自行终止。取消选中“失败时终止”复选框后,实例不会终止,但是我无法访问我的 Default.aspx 页面。我无法在日志中找到任何有用的信息。我认为它必须与连接字符串和附加卷有关。
我将我的安全组添加到用于启动实例的 RDS 实例中,但它仍然返回相同的错误。
发布信息:
实例大小:Micro
SDK 版本:1.5.10
AMI:ami-10ec6520
地区:美国西部 2
错误:
WaitCondition 超时。期望 1 时收到 0 个条件。
堆栈模板
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "This will launch a single EC2 instance and deploy your application to it. **WARNING** This template creates one or more Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"InstanceType" : {
"Type" : "String",
"Default" : "t1.micro",
"Description" : "EC2 instance type."
},
"KeyPair" : {
"Type" : "String",
"Description" : "EC2 Key Pair."
},
"SecurityGroup" : {
"Type" : "String",
"Description" : "EC2 Security Group"
},
"BucketName" : {
"Type" : "String",
"Description" : "[Hidden]S3 Bucket for deployment."
},
"ConfigFile" : {
"Type" : "String",
"Description" : "[Hidden]Deployment Configuration File."
},
"AmazonMachineImage" : {
"Type" : "String",
"Default" : "ami-10ec6520",
"Description" : "AMI to launch."
},
"UserData" : {
"Type" : "String",
"Description" : "[Hidden]Base64-Encoded user data."
}
},
"Resources" : {
"DeployedApplicationWaitHandle" : {
"Type" : "AWS::CloudFormation::WaitConditionHandle",
"Properties" : {
}
},
"DeployedApplicationWaitCondition" : {
"Type" : "AWS::CloudFormation::WaitCondition",
"DependsOn" : "Ec2Instance",
"Properties" : {
"Handle" : { "Ref" : "DeployedApplicationWaitHandle" },
"Timeout" : "900"
}
},
"Ec2Instance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"ImageId" : { "Ref" : "AmazonMachineImage" },
"KeyName" : { "Ref" : "KeyPair" },
"InstanceType" : { "Ref" : "InstanceType" },
"SecurityGroups" : [{ "Ref" : "SecurityGroup" }],
"UserData" : { "Fn::Base64" : {"Fn::Join" : [ "", ["[", { "Ref" : "UserData" }, "]", "[", { "Ref" : "DeployedApplicationWaitHandle" }, "]"] ]}}
}
}
},
"Outputs" : {
"URL" : {
"Description": "URL of the deployed application",
"Value" : { "Fn::Join" : [ "", [ "http://", { "Fn::GetAtt" : [ "Ec2Instance", "PublicDnsName" ] }]]}
},
"Bucket" : {
"Description" : "The S3 Bucket where the Web Deploy archive and configuration file are uploaded",
"Value" : { "Ref" : "BucketName" }
},
"ConfigFile" : {
"Description" : "The deployment configuration for the application",
"Value" : { "Ref" : "ConfigFile" }
},
"VSToolkitDeployed" : {
"Description" : "A flag indicating that the stack was created via VSToolkit Deploy wizard",
"Value" : "True"
}
}
}
2013 年 1 月 18 日更新
我终于启动了一个实例,让我 RDP 进入它。下面是突出的错误。
错误:
Microsoft.Web.Deployment.DeploymentFatalException:由于缺少依赖项,SQL 提供程序无法运行。请确保已安装 Microsoft SQL Server 管理对象(版本 10 或更高版本)。---> System.IO.FileNotFoundException:无法加载文件或程序集 'Microsoft.SqlServer.Smo,Version=10.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91' 或其依赖项之一。该系统找不到指定的文件。
任何帮助将不胜感激!如果有更多信息有助于提供,请告诉我。