VPC Peering with ASG

0

So its not possible to access an Elastic Load balancer over a VPC Peering when an ASG is used as the ASG is looking for a target type of instance ID and having IP isn't an allowed value.

I'm not aware of any alternatives, without having to manually add the IP address to a target group

Ref https://docs.aws.amazon.com/autoscaling/ec2/userguide/getting-started-elastic-load-balancing.html https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-troubleshooting.html

2개 답변
1

I have not tried this but I wonder if you could use Amazon EC2 Auto Scaling lifecycle hooks to automate adding and deleting the IPs in a target group as the instances are being added and removed from the auto scaling group.

profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • Thanks- not a bad shout. My only concern is that if an instance becomes unhealthy the script wouldn't be able to run from that instance; so the instance starting up would need to obtain the active instances from the ASG to then update the IPs for the target group.

    I've not used lifecycles hooks so it would be something I'd look in to further.

    But I suspect this is the only method to achieve this.. Which is a shame as its just seems a bit like a bodge until AWS implements something

0
수락된 답변

I used instance (type) on the asg, and disregarding what the AWS article says about VPC peeing, I've been able to access the resources fine.

joet
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠