jeudi 15 octobre 2015

How to get the instance id of the instance being created inside the user data of CFT?

I was successfully able to attach another instance id from inside powershell if aws ec2 windows instance using CFT.

Can someone please help me how to get the instance id of the instance being created as I need to use inside the user data for ELB registration. So, in simpler words, i want to register the same instance that i am creating.

Below is my working command :-

Register-ELBInstanceWithLoadBalancer -LoadBalancerName ire798ELB -Instances i-b90d8d06 -Region us-east-1

But here i-b90d8d06 is some other instance id and not the one i am creating.




Aucun commentaire:

Enregistrer un commentaire