arkadiyt/aws_public_ips

Partager

news image

Desk of Contents

What’s it for

aws_public_ips is a machine to salvage all public IP addresses (every IPv4/IPv6) linked with an AWS legend.

It will also also be aged as a library and as a CLI, and supports the next AWS products and companies (all with every Traditional & VPC flavors):

  • APIGateway
  • CloudFront
  • EC2 (and as a outcome: ECS, EKS, Beanstalk, Fargate, Batch, & NAT Cases)
  • ElasticSearch
  • ELB (Traditional ELB)
  • ELBv2 (ALB/NLB)
  • Lightsail
  • RDS
  • Redshift

If a provider is rarely listed (S3, ElastiCache, and loads others) it’s probably because it does now not beget anything to enhance (i.e. it is going to also merely now now not be deployable publicly, it is going to also want all ip addresses resolve to global AWS infrastructure, and loads others).

Like a flash birth

  • Install the gem and bustle it:
$ gem install aws_public_ips
$ aws_public_ips  # Makes consume of default ~/.aws/credentials
fifty two.84.eleven.thirteen
fifty two.84.eleven.eighty three
fifty two.84.eleven.159
fifty two.84.eleven.104
2600:9000:2039:ba00:1a:cd27:1440:93a1
2600:9000:2039:6e00:1a:cd27:1440:93a1
2600:9000:2039:1200:1a:cd27:1440:93a1
2600:9000:2039:cc00:1a:cd27:1440:93a1
2600:9000:2039:2a00:1a:cd27:1440:93a1
2600:9000:2039:2400:1a:cd27:1440:93a1
2600:9000:2039:2e00:1a:cd27:1440:93a1
2600:9000:2039:ae00:1a:cd27:1440:93a1

CLI reference

$ aws_public_ips --reduction
Utilization: aws_public_ips [options]
    -s, --products and companies ,,    List of AWS products and companies to verify. Available products and companies: apigateway,cloudfront,ec2,elasticsearch,elb,elbv2,lightsail,rds,redshift. Defaults to all.
    -f, --structure             Remark output structure. Available formats: json,prettyjson,textual protest material. Defaults to textual protest material.
    -v, --[no-]verbose               Enable debug/hint output

Configuration

For authentication aws_public_ips uses the default aws-sdk-ruby configuration, that draw that the next are checked in justify:

  1. Environment variables:
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION
  • AWS_PROFILE
  1. Shared credentials recordsdata:
  • ~/.aws/credentials
  • ~/.aws/config
  1. Occasion profile by metadata endpoint (if working on EC2, ECS, EKS, or Fargate)

For added info to find the AWS SDK documentation on configuration.

IAM permissions

To seek out the public IPs from all AWS products and companies, the minimal IAM policy wished is:

{
  "Version": "2012-10-17",
  "Assertion": [
    {
      "Attain": "Enable",
      "Action": [
        "apigateway:GET",
        "cloudfront:ListDistributions",
        "ec2:DescribeInstances",
        "elasticloadbalancing:DescribeLoadBalancers",
        "lightsail:GetInstances",
        "lightsail:GetLoadBalancers",
        "rds:DescribeDBInstances",
        "redshift:DescribeClusters"
      ],
      "Useful resource": "*"
    }
  ]
}

Changelog

Please to find CHANGELOG.md. This mission follows semantic versioning.

Contributing

Please to find CONTRIBUTING.md.

Appealing into touch

Be at liberty to tweet or divulge message me: @arkadiyt

Read More

(Visité 7 fois, 1 aujourd'hui)

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *