I have installed the AWS SDK for .Net.
I need to write a program to change the permissions for a security group, and I found an example of how to do this in C# on http://ift.tt/1zWkjgA (page 39).
Dim ipPermission As New IpPermission()
ipPermission.IpProtocol = "tcp"
ipPermission.FromPort = 3389
ipPermission.ToPort = 3389
ipPermission.IpRanges = IPRange
Dim ingressRequest As New AuthorizeSecurityGroupIngressRequest()
ingressRequest.GroupId = "sg-xxxxxxxx"
ingressRequest.IpPermissions.Add(ipPermission)
Dim endpoint As RegionEndpoint = RegionEndpoint.EUWest1
config.RegionEndpoint = endpoint
Dim ec2Client As New AmazonEC2Client(credentials, config)
Dim ingressResponse As System.Threading.Tasks.Task(Of AuthorizeSecurityGroupIngressResponse) = ec2Client.AuthorizeSecurityGroupIngressAsync(ingressRequest)
However, when I try to run the code it comes up with the following exception:
Unable to reach credentials server
Is this a bug in the SDK, or am I doing something wrong?
I have tried everything that I can think of and nothing is helping, and I'm desperate for help!
Aucun commentaire:
Enregistrer un commentaire