'Find CodePipeline CIDR to add it to EC2 Security Group inbound rules

We are using AWS CodePipeline and at the build step we want to call an API hosted on an EC2 instance. That EC2 instance has a security group with some inbound rules. Is there any way to find out CIDR of the CodeBuild docker fleet, so we can add it to EC2 security group inbound rules, so that every stage from CodePipeline can call that API?



Solution 1:[1]

The range of public IP addresses used by the AWS CodeBuild build fleet is published here: http://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html You can use the published range for each region in your security group rules.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Clare Liguori