{"id":13539236,"url":"https://github.com/arkadiyt/aws_public_ips","last_synced_at":"2025-05-16T02:07:10.109Z","repository":{"id":62553862,"uuid":"133288540","full_name":"arkadiyt/aws_public_ips","owner":"arkadiyt","description":"Fetch all public IP addresses tied to your AWS account. Works with IPv4/IPv6, Classic/VPC networking, and across all AWS services","archived":false,"fork":false,"pushed_at":"2021-04-29T16:03:42.000Z","size":70,"stargazers_count":641,"open_issues_count":4,"forks_count":89,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-11T13:06:41.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arkadiyt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-14T01:16:39.000Z","updated_at":"2025-04-22T17:20:58.000Z","dependencies_parsed_at":"2022-11-03T04:45:31.159Z","dependency_job_id":null,"html_url":"https://github.com/arkadiyt/aws_public_ips","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiyt%2Faws_public_ips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiyt%2Faws_public_ips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiyt%2Faws_public_ips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkadiyt%2Faws_public_ips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arkadiyt","download_url":"https://codeload.github.com/arkadiyt/aws_public_ips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453651,"owners_count":22073617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:01:22.176Z","updated_at":"2025-05-16T02:07:10.086Z","avatar_url":"https://github.com/arkadiyt.png","language":"Ruby","funding_links":[],"categories":["Ruby","\u003ca id=\"c71ad1932bbf9c908af83917fe1fd5da\"\u003e\u003c/a\u003eAWS","Other Awesome Lists","Ruby (88)","Инструменты"],"sub_categories":["\u003ca id=\"0476f6b97e87176da0a0d7328f8747e7\"\u003e\u003c/a\u003eblog","General Utilities","Безопасность AWS"],"readme":"# aws_public_ips  [![Gem](https://img.shields.io/gem/v/aws_public_ips.svg)](https://rubygems.org/gems/aws_public_ips) [![TravisCI](https://travis-ci.com/arkadiyt/aws_public_ips.svg?branch=master)](https://travis-ci.com/arkadiyt/aws_public_ips/) [![Coverage Status](https://coveralls.io/repos/github/arkadiyt/aws_public_ips/badge.svg?branch=master)](https://coveralls.io/github/arkadiyt/aws_public_ips?branch=master) [![License](https://img.shields.io/github/license/arkadiyt/aws_public_ips.svg)](https://github.com/arkadiyt/aws_public_ips/blob/master/LICENSE.md)\n\n## Table of Contents\n- [What's it for](https://github.com/arkadiyt/aws_public_ips#whats-it-for)\n- [Quick start](https://github.com/arkadiyt/aws_public_ips#quick-start)\n- [CLI reference](https://github.com/arkadiyt/aws_public_ips#cli-reference)\n- [Configuration](https://github.com/arkadiyt/aws_public_ips#configuration)\n- [IAM permissions](https://github.com/arkadiyt/aws_public_ips#iam-permissions)\n- [Changelog](https://github.com/arkadiyt/aws_public_ips#changelog)\n- [Contributing](https://github.com/arkadiyt/aws_public_ips#contributing)\n- [Getting in touch](https://github.com/arkadiyt/aws_public_ips#getting-in-touch)\n\n### What's it for\n\naws_public_ips is a tool to fetch all public IP addresses (both IPv4/IPv6) associated with an AWS account.\n\nIt can be used as a library and as a CLI, and supports the following AWS services (all with both Classic \u0026 VPC flavors):\n\n- APIGateway\n- CloudFront\n- EC2 (and as a result: ECS, EKS, Beanstalk, Fargate, Batch, \u0026 NAT Instances)\n- ElasticSearch\n- ELB (Classic ELB)\n- ELBv2 (ALB/NLB)\n- Lightsail\n- RDS\n- Redshift\n\nIf a service isn't listed (S3, ElastiCache, etc) it's most likely because it doesn't have anything to support (i.e. it might not be deployable publicly, it might have all ip addresses resolve to global AWS infrastructure, etc).\n\n### Quick start\n\nInstall the gem and run it:\n```\n$ gem install aws_public_ips\n\n# Uses default ~/.aws/credentials\n$ aws_public_ips\n52.84.11.13\n52.84.11.83\n2600:9000:2039:ba00:1a:cd27:1440:93a1\n2600:9000:2039:6e00:1a:cd27:1440:93a1\n\n# With a custom profile\n$ AWS_PROFILE=production aws_public_ips\n52.84.11.159\n```\n\nThe gem can also be run from Docker:\n```\n$ docker pull arkadiyt/aws_public_ips\n\n# For credentials, ensure the appropriate environment variables are defined in the host environment:\n$ docker run -e AWS_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN arkadiyt/aws_public_ips\n```\n\n### CLI reference\n\n```\n$ aws_public_ips --help\nUsage: aws_public_ips [options]\n    -s, --services \u003cs1\u003e,\u003cs2\u003e,\u003cs3\u003e    List of AWS services to check. Available services: apigateway,cloudfront,ec2,elasticsearch,elb,elbv2,lightsail,rds,redshift. Defaults to all.\n    -f, --format \u003cformat\u003e            Set output format. Available formats: json,prettyjson,text. Defaults to text.\n    -v, --[no-]verbose               Enable debug/trace output\n        --version                    Print version\n    -h, --help                       Show this help message\n```\n\n### Configuration\n\nFor authentication aws_public_ips uses the default [aws-sdk-ruby](https://github.com/aws/aws-sdk-ruby) configuration, meaning that the following are checked in order:\n1. Environment variables:\n  - `AWS_ACCESS_KEY_ID`\n  - `AWS_SECRET_ACCESS_KEY`\n  - `AWS_REGION`\n  - `AWS_PROFILE`\n2. Shared credentials files:\n  - `~/.aws/credentials`\n  - `~/.aws/config`\n3. Instance profile via metadata endpoint (if running on EC2, ECS, EKS, or Fargate)\n\nFor more information see the AWS SDK [documentation on configuration](https://github.com/aws/aws-sdk-ruby#configuration).\n\n### IAM permissions\nTo find the public IPs from all AWS services, the minimal policy needed by your IAM user is:\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"apigateway:GET\",\n        \"cloudfront:ListDistributions\",\n        \"ec2:DescribeInstances\",\n        \"elasticloadbalancing:DescribeLoadBalancers\",\n        \"lightsail:GetInstances\",\n        \"lightsail:GetLoadBalancers\",\n        \"rds:DescribeDBInstances\",\n        \"redshift:DescribeClusters\",\n        \"es:ListDomainNames\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n### Changelog\n\nPlease see [CHANGELOG.md](https://github.com/arkadiyt/aws_public_ips/blob/master/CHANGELOG.md). This project follows [semantic versioning](https://semver.org/).\n\n### Contributing\n\nPlease see [CONTRIBUTING.md](https://github.com/arkadiyt/aws_public_ips/blob/master/CONTRIBUTING.md).\n\n### Getting in touch\n\nFeel free to tweet or direct message me: [@arkadiyt](https://twitter.com/arkadiyt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkadiyt%2Faws_public_ips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkadiyt%2Faws_public_ips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkadiyt%2Faws_public_ips/lists"}