Unable to register targets on AWS Target groupHow to register an EC2 Instance with an ELBV2?Any AWS Powershell command fails with message “Invalid URI: The hostname could not be parsed.”PowerShell ISE vs ScriptIssues while running Register-ELBInstanceWithLoadBalancer on powershellPowershell Script Issue with SQL Server 2012/2014Excecuting a Powershell script within a SSIS packagePassing an array as parameter from CMD to PowerShell give problemsWatch a folder on another server for changesError in executing Exchange PS remoting: Method invocation failed?creating mutilple load balancers ,target groups and listeners in terraformI can't get Powershell StartsWith function to work

Finitely generated matrix groups whose eigenvalues are all algebraic

Blending or harmonizing

Does the Idaho Potato Commission associate potato skins with healthy eating?

Can a virus destroy the BIOS of a modern computer?

Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?

In Bayesian inference, why are some terms dropped from the posterior predictive?

Is there a hemisphere-neutral way of specifying a season?

How can I prove that a state of equilibrium is unstable?

Processor speed limited at 0.4 Ghz

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

How do I exit BASH while loop using modulus operator?

What is the opposite of "eschatology"?

Does marriage to a non-Numenorean disqualify a candidate for the crown of Gondor?

Is it possible to create a QR code using text?

Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?

What is an equivalently powerful replacement spell for Yuan-Ti's Suggestion spell?

How could indestructible materials be used in power generation?

Notepad++ delete until colon for every line with replace all

Mathematica command that allows it to read my intentions

Bullying boss launched a smear campaign and made me unemployable

Avoiding the "not like other girls" trope?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

Implication of namely

Placement of More Information/Help Icon button for Radio Buttons



Unable to register targets on AWS Target group


How to register an EC2 Instance with an ELBV2?Any AWS Powershell command fails with message “Invalid URI: The hostname could not be parsed.”PowerShell ISE vs ScriptIssues while running Register-ELBInstanceWithLoadBalancer on powershellPowershell Script Issue with SQL Server 2012/2014Excecuting a Powershell script within a SSIS packagePassing an array as parameter from CMD to PowerShell give problemsWatch a folder on another server for changesError in executing Exchange PS remoting: Method invocation failed?creating mutilple load balancers ,target groups and listeners in terraformI can't get Powershell StartsWith function to work













1















I am trying to setup an automated DNS deployment using powershell. I have written a powershell script that creates TargetGroup, registers instances to the TG, creates an ALB and adds a listener to it. Once, that is done, it creates R53 RecordSet and creates an A record to the ALB DNS.
I am having issues in having the instances registered to the TargetGroup.
This is my code snippet to that section:



$searchFor1 =@( @name = 'tag:Name'; values = $target1)
$searchFor2 =@( @name = 'tag:Name'; values = $target2)

$id1 = (Get-EC2Instance -Filter $searchFor1).Instances | select InstanceId
$id2 = (Get-EC2Instance -Filter $searchFor2).Instances | select InstanceId

# Create Target Group

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $custname -Port $siteport -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $vpcid
Start-Sleep -s 120
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid2 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $id1.InstanceId
$addid2.Id = $id2.InstanceId
$addid1.Port = $siteport
$addid2.Port = $siteport
$tgarn = (Get-ELB2TargetGroup -Name $custname).TargetGroupArn
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid2)


It throws below error:



Register-ELB2Target : An instance ID must be specified
At C:scriptsDistinct-DNS-Deployment.ps1:107 char:1
+ Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Amazon.PowerShe...LB2TargetCmdlet:RegisterELB2TargetCmdlet) [Register
-ELB2Target], InvalidOperationException
+ FullyQualifiedErrorId : Amazon.ElasticLoadBalancingV2.AmazonElasticLoadBalancingV2Exception,Amazon.PowerShell.Cm
dlets.ELB2.RegisterELB2TargetCmdlet


I have checked a similar post here. And the corresponding posts, so far nothing helped. I am wondering if anyone can guide me what am I doing wrong?



I have tried to run each line one by one and that happens to register the instance to the TargetGroup, just the script fails.
Instances are t2.micro and they are in running state.










share|improve this question
























  • Are you sure there is something actually returned from the search of the instances: $addid1.Id = $id1.InstanceId <-- this line should be verified --- I could visualize the error 'An instance ID must be specified' only in case if $addid1.Id is $null not have valid instance id

    – Ketanbhut
    Mar 10 at 9:35
















1















I am trying to setup an automated DNS deployment using powershell. I have written a powershell script that creates TargetGroup, registers instances to the TG, creates an ALB and adds a listener to it. Once, that is done, it creates R53 RecordSet and creates an A record to the ALB DNS.
I am having issues in having the instances registered to the TargetGroup.
This is my code snippet to that section:



$searchFor1 =@( @name = 'tag:Name'; values = $target1)
$searchFor2 =@( @name = 'tag:Name'; values = $target2)

$id1 = (Get-EC2Instance -Filter $searchFor1).Instances | select InstanceId
$id2 = (Get-EC2Instance -Filter $searchFor2).Instances | select InstanceId

# Create Target Group

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $custname -Port $siteport -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $vpcid
Start-Sleep -s 120
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid2 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $id1.InstanceId
$addid2.Id = $id2.InstanceId
$addid1.Port = $siteport
$addid2.Port = $siteport
$tgarn = (Get-ELB2TargetGroup -Name $custname).TargetGroupArn
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid2)


It throws below error:



Register-ELB2Target : An instance ID must be specified
At C:scriptsDistinct-DNS-Deployment.ps1:107 char:1
+ Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Amazon.PowerShe...LB2TargetCmdlet:RegisterELB2TargetCmdlet) [Register
-ELB2Target], InvalidOperationException
+ FullyQualifiedErrorId : Amazon.ElasticLoadBalancingV2.AmazonElasticLoadBalancingV2Exception,Amazon.PowerShell.Cm
dlets.ELB2.RegisterELB2TargetCmdlet


I have checked a similar post here. And the corresponding posts, so far nothing helped. I am wondering if anyone can guide me what am I doing wrong?



I have tried to run each line one by one and that happens to register the instance to the TargetGroup, just the script fails.
Instances are t2.micro and they are in running state.










share|improve this question
























  • Are you sure there is something actually returned from the search of the instances: $addid1.Id = $id1.InstanceId <-- this line should be verified --- I could visualize the error 'An instance ID must be specified' only in case if $addid1.Id is $null not have valid instance id

    – Ketanbhut
    Mar 10 at 9:35














1












1








1








I am trying to setup an automated DNS deployment using powershell. I have written a powershell script that creates TargetGroup, registers instances to the TG, creates an ALB and adds a listener to it. Once, that is done, it creates R53 RecordSet and creates an A record to the ALB DNS.
I am having issues in having the instances registered to the TargetGroup.
This is my code snippet to that section:



$searchFor1 =@( @name = 'tag:Name'; values = $target1)
$searchFor2 =@( @name = 'tag:Name'; values = $target2)

$id1 = (Get-EC2Instance -Filter $searchFor1).Instances | select InstanceId
$id2 = (Get-EC2Instance -Filter $searchFor2).Instances | select InstanceId

# Create Target Group

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $custname -Port $siteport -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $vpcid
Start-Sleep -s 120
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid2 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $id1.InstanceId
$addid2.Id = $id2.InstanceId
$addid1.Port = $siteport
$addid2.Port = $siteport
$tgarn = (Get-ELB2TargetGroup -Name $custname).TargetGroupArn
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid2)


It throws below error:



Register-ELB2Target : An instance ID must be specified
At C:scriptsDistinct-DNS-Deployment.ps1:107 char:1
+ Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Amazon.PowerShe...LB2TargetCmdlet:RegisterELB2TargetCmdlet) [Register
-ELB2Target], InvalidOperationException
+ FullyQualifiedErrorId : Amazon.ElasticLoadBalancingV2.AmazonElasticLoadBalancingV2Exception,Amazon.PowerShell.Cm
dlets.ELB2.RegisterELB2TargetCmdlet


I have checked a similar post here. And the corresponding posts, so far nothing helped. I am wondering if anyone can guide me what am I doing wrong?



I have tried to run each line one by one and that happens to register the instance to the TargetGroup, just the script fails.
Instances are t2.micro and they are in running state.










share|improve this question
















I am trying to setup an automated DNS deployment using powershell. I have written a powershell script that creates TargetGroup, registers instances to the TG, creates an ALB and adds a listener to it. Once, that is done, it creates R53 RecordSet and creates an A record to the ALB DNS.
I am having issues in having the instances registered to the TargetGroup.
This is my code snippet to that section:



$searchFor1 =@( @name = 'tag:Name'; values = $target1)
$searchFor2 =@( @name = 'tag:Name'; values = $target2)

$id1 = (Get-EC2Instance -Filter $searchFor1).Instances | select InstanceId
$id2 = (Get-EC2Instance -Filter $searchFor2).Instances | select InstanceId

# Create Target Group

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $custname -Port $siteport -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $vpcid
Start-Sleep -s 120
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid2 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $id1.InstanceId
$addid2.Id = $id2.InstanceId
$addid1.Port = $siteport
$addid2.Port = $siteport
$tgarn = (Get-ELB2TargetGroup -Name $custname).TargetGroupArn
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid2)


It throws below error:



Register-ELB2Target : An instance ID must be specified
At C:scriptsDistinct-DNS-Deployment.ps1:107 char:1
+ Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Amazon.PowerShe...LB2TargetCmdlet:RegisterELB2TargetCmdlet) [Register
-ELB2Target], InvalidOperationException
+ FullyQualifiedErrorId : Amazon.ElasticLoadBalancingV2.AmazonElasticLoadBalancingV2Exception,Amazon.PowerShell.Cm
dlets.ELB2.RegisterELB2TargetCmdlet


I have checked a similar post here. And the corresponding posts, so far nothing helped. I am wondering if anyone can guide me what am I doing wrong?



I have tried to run each line one by one and that happens to register the instance to the TargetGroup, just the script fails.
Instances are t2.micro and they are in running state.







amazon-web-services powershell aws-alb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 21:03







Amitabh Ghosh

















asked Mar 8 at 20:40









Amitabh GhoshAmitabh Ghosh

336




336












  • Are you sure there is something actually returned from the search of the instances: $addid1.Id = $id1.InstanceId <-- this line should be verified --- I could visualize the error 'An instance ID must be specified' only in case if $addid1.Id is $null not have valid instance id

    – Ketanbhut
    Mar 10 at 9:35


















  • Are you sure there is something actually returned from the search of the instances: $addid1.Id = $id1.InstanceId <-- this line should be verified --- I could visualize the error 'An instance ID must be specified' only in case if $addid1.Id is $null not have valid instance id

    – Ketanbhut
    Mar 10 at 9:35

















Are you sure there is something actually returned from the search of the instances: $addid1.Id = $id1.InstanceId <-- this line should be verified --- I could visualize the error 'An instance ID must be specified' only in case if $addid1.Id is $null not have valid instance id

– Ketanbhut
Mar 10 at 9:35






Are you sure there is something actually returned from the search of the instances: $addid1.Id = $id1.InstanceId <-- this line should be verified --- I could visualize the error 'An instance ID must be specified' only in case if $addid1.Id is $null not have valid instance id

– Ketanbhut
Mar 10 at 9:35













1 Answer
1






active

oldest

votes


















0














As per the https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/ElasticLoadBalancingV2/TTargetDescription.html -
the Amazon.ElasticLoadBalancingV2.Model.TargetDescription is about 'Information about a target' -
which means, you should be assigning a single instance id Also, if you take a close look at the properties:



AvailabilityZone System.String



Id System.String



Port System.Int32



The result of your instance search may or may not be single output - you should keep them in loop to create each target via TargetDescription



$Instances = (Get-EC2Instance -Filter @Name="tag:auto-delete";Value="no").instances |select instanceid

$theVpc = get-ec2vpc -VpcId vpc-4565e5c4
$name = "new-tg"
$port = "80"
$protocol = "HTTP"

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $name -Port $port -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $theVpc.VpcId
$tgarn = (Get-ELB2TargetGroup -Name $name).TargetGroupArn

If($instances -ne $null)
foreach ($instance in $instances )
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $Instance.instanceid
$addid1.Port = $port
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Remove-Variable addid1


else
echo "There were no instances with the matching filter"






share|improve this answer

























  • Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

    – Amitabh Ghosh
    Mar 12 at 5:17












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55070684%2funable-to-register-targets-on-aws-target-group%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As per the https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/ElasticLoadBalancingV2/TTargetDescription.html -
the Amazon.ElasticLoadBalancingV2.Model.TargetDescription is about 'Information about a target' -
which means, you should be assigning a single instance id Also, if you take a close look at the properties:



AvailabilityZone System.String



Id System.String



Port System.Int32



The result of your instance search may or may not be single output - you should keep them in loop to create each target via TargetDescription



$Instances = (Get-EC2Instance -Filter @Name="tag:auto-delete";Value="no").instances |select instanceid

$theVpc = get-ec2vpc -VpcId vpc-4565e5c4
$name = "new-tg"
$port = "80"
$protocol = "HTTP"

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $name -Port $port -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $theVpc.VpcId
$tgarn = (Get-ELB2TargetGroup -Name $name).TargetGroupArn

If($instances -ne $null)
foreach ($instance in $instances )
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $Instance.instanceid
$addid1.Port = $port
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Remove-Variable addid1


else
echo "There were no instances with the matching filter"






share|improve this answer

























  • Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

    – Amitabh Ghosh
    Mar 12 at 5:17
















0














As per the https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/ElasticLoadBalancingV2/TTargetDescription.html -
the Amazon.ElasticLoadBalancingV2.Model.TargetDescription is about 'Information about a target' -
which means, you should be assigning a single instance id Also, if you take a close look at the properties:



AvailabilityZone System.String



Id System.String



Port System.Int32



The result of your instance search may or may not be single output - you should keep them in loop to create each target via TargetDescription



$Instances = (Get-EC2Instance -Filter @Name="tag:auto-delete";Value="no").instances |select instanceid

$theVpc = get-ec2vpc -VpcId vpc-4565e5c4
$name = "new-tg"
$port = "80"
$protocol = "HTTP"

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $name -Port $port -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $theVpc.VpcId
$tgarn = (Get-ELB2TargetGroup -Name $name).TargetGroupArn

If($instances -ne $null)
foreach ($instance in $instances )
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $Instance.instanceid
$addid1.Port = $port
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Remove-Variable addid1


else
echo "There were no instances with the matching filter"






share|improve this answer

























  • Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

    – Amitabh Ghosh
    Mar 12 at 5:17














0












0








0







As per the https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/ElasticLoadBalancingV2/TTargetDescription.html -
the Amazon.ElasticLoadBalancingV2.Model.TargetDescription is about 'Information about a target' -
which means, you should be assigning a single instance id Also, if you take a close look at the properties:



AvailabilityZone System.String



Id System.String



Port System.Int32



The result of your instance search may or may not be single output - you should keep them in loop to create each target via TargetDescription



$Instances = (Get-EC2Instance -Filter @Name="tag:auto-delete";Value="no").instances |select instanceid

$theVpc = get-ec2vpc -VpcId vpc-4565e5c4
$name = "new-tg"
$port = "80"
$protocol = "HTTP"

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $name -Port $port -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $theVpc.VpcId
$tgarn = (Get-ELB2TargetGroup -Name $name).TargetGroupArn

If($instances -ne $null)
foreach ($instance in $instances )
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $Instance.instanceid
$addid1.Port = $port
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Remove-Variable addid1


else
echo "There were no instances with the matching filter"






share|improve this answer















As per the https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/ElasticLoadBalancingV2/TTargetDescription.html -
the Amazon.ElasticLoadBalancingV2.Model.TargetDescription is about 'Information about a target' -
which means, you should be assigning a single instance id Also, if you take a close look at the properties:



AvailabilityZone System.String



Id System.String



Port System.Int32



The result of your instance search may or may not be single output - you should keep them in loop to create each target via TargetDescription



$Instances = (Get-EC2Instance -Filter @Name="tag:auto-delete";Value="no").instances |select instanceid

$theVpc = get-ec2vpc -VpcId vpc-4565e5c4
$name = "new-tg"
$port = "80"
$protocol = "HTTP"

$tg = New-ELB2TargetGroup -TargetType "instance" -HealthyThresholdCount 4 -Name $name -Port $port -Protocol "HTTP" -UnhealthyThresholdCount 4 -VpcId $theVpc.VpcId
$tgarn = (Get-ELB2TargetGroup -Name $name).TargetGroupArn

If($instances -ne $null)
foreach ($instance in $instances )
$addid1 = New-Object Amazon.ElasticLoadBalancingV2.Model.TargetDescription
$addid1.Id = $Instance.instanceid
$addid1.Port = $port
Register-ELB2Target -TargetGroupArn $tgarn -Target @($addid1)
Remove-Variable addid1


else
echo "There were no instances with the matching filter"







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 12 at 17:45

























answered Mar 10 at 9:57









KetanbhutKetanbhut

1417




1417












  • Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

    – Amitabh Ghosh
    Mar 12 at 5:17


















  • Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

    – Amitabh Ghosh
    Mar 12 at 5:17

















Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

– Amitabh Ghosh
Mar 12 at 5:17






Hello, The issue was how the targets are being looked at. I had $target = $target.ToLower(). Which was returning the name tag all in lowercase, whereas the actual instance name tag had 1st character uppercase. The $addid1.id was thus returning null value. After rectifying that, I was able to register targets. Thanks KS for your insight as well, I will try it out as an alternate way to address this.

– Amitabh Ghosh
Mar 12 at 5:17




















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55070684%2funable-to-register-targets-on-aws-target-group%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229