无法卷曲我的EC2实例以获取我的EC2实例信息

时间:2016-11-29 05:53:13

标签: amazon-web-services curl amazon-ec2

我正在尝试关注这些Instance Metadata and User Data文档。

我正在尝试卷曲我的EC2实例,但由于某种原因它拒绝连接。我已允许namespace AUBank.Credit { public class CreditEval : MarshalByRefObject { ... public DataSet GetCreditEvalbyRef(string cRef) { string allVariables = ""; try { int a; double b; string c; /* other code */ } catch (Exception) { MethodBase method = (MethodBase)this.GetType().GetMember("GetCreditEvalbyRef")[2]; MethodBody body = method.GetMethodBody(); foreach (LocalVariableInfo variableInfo in body.LocalVariables) { allVariables += "Variable: " + variableInfo.ToString() + "\n"; } } } } } HTTP的传入请求,并允许我的安全组中的所有流量用于传出流量。我可以SSH但不能ssh

我错过了什么?

1 个答案:

答案 0 :(得分:4)

可以通过以下网址从Amazon EC2实例中获取Amazon EC2 instance metadata service

curl http://169.254.169.254/latest/meta-data/
相关问题