Skip to content

Find ec2 instance id using IP #345

@nitrocode

Description

@nitrocode

I cannot find a way to do this using bashmyaws.

Here's a way to do it with the cli.

✗ aws ec2 describe-instances \
  --filter Name=ip-address,Values=1.2.3.4 ]
  --query 'Reservations[].Instances[].InstanceId' \
  --output text
i-00a73299asdjh239

Ref https://serverfault.com/a/710936

Can this be added perhaps as instance-from-private-ip ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions