awslabs / ecs-refarch-service-discovery

An EC2 Container Service Reference Architecture for providing Service Discovery to containers using CloudWatch Events, Lambda and Route 53 private hosted zones.
Apache License 2.0
445 stars 81 forks source link

Hard Coded Instance Id is not working #9

Open rasekar2000 opened 7 years ago

rasekar2000 commented 7 years ago

https://github.com/awslabs/ecs-refarch-service-discovery/blob/master/microservices/twitch/src/twitch.go#L199

cmdArgs := []string{"-s", "http://169.254.169.254/latest/meta-data/instance-id"}

Is this URL hardcoded ? can we please know the better way to get instance-id?

Thanks in advance.

schmutze commented 7 years ago

Hi @rasekar2000, this is the correct way to retrieve the instance-id on a running EC2 instance. Please see: http://amzn.to/2mMmjMW

Can you clarify what is not working?