For private IP address:

aws ec2 describe-instances --instance-ids i-b78a096f | grep PrivateIpAddress  | head -1 | awk -F ":" '{print $2}' | sed 's/[",]//g'

  

For public IP address:

aws ec2 describe-instances --instance-ids i-b78a096f | grep PublicIpAddress | awk -F ":" '{print $2}' | sed 's/[",]//g'

  

Getting Private/Public IP address of EC2 instance using AWS-cli [closed]的更多相关文章

  1. Assign an Elastic IP Address to Your Instance

    By default, an instance in a nondefault VPC is not assigned a public IP address, and is private.You ...

  2. Windows Azure Virtual Machine (28) 使用Azure实例级别IP,Instance-Level Public IP Address (PIP)

    <Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China 熟悉Azure平台的读者都知道,我们在使用Azure Virtual ...

  3. Azure PIP (Instance Level Public IP)

    微软的Azure平台已经支持Instance Level Public IP功能.当有复杂协议的情况下,需要开启多个端口的情况下,可以考虑开启PIP功能. 先介绍几个概念: VIP – virtual ...

  4. Azure VM Public IP设置

    Azure虚拟机的Public IP是用于客户端直连云中的虚拟机,可以认为是一个外网IP,一般我们为虚拟机设置终结点,例如HTTP的80端口,如果使用Public IP可以不使用Azure Porta ...

  5. Azure PowerShell (9) 使用PowerShell导出订阅下所有的Azure VM的Public IP和Private IP

    <Windows Azure Platform 系列文章目录> 笔者在之前的工作中,有客户提出想一次性查看Azure订阅下的所有Azure VM的Public IP和Private IP. ...

  6. Azure China (8) 使用Azure PowerShell创建虚拟机,并设置固定Virtual IP Address和Private IP

    <Windows Azure Platform 系列文章目录> 本文介绍的是由世纪互联运维的Windows Azure China. 相比于Global Azure (http://www ...

  7. 更改oracle RAC public ip,vip,scan ip和private ip

    更改oracle RAC public ip,vip,scan ip和private ip oifcfg - Oracle 接口配置工具 用法:  oifcfg iflist [-p [-n]]    ...

  8. Rejected request from RFC1918 IP to public server address

    Rejected request from RFC1918 IP to public server address

  9. 关于alertmanager报No private IP address found, and explicit IP not provided

    ./alertmanager --config.file=alertmanager.yml level=info ts=2021-11-22T05:53:11.195Z caller=main.go: ...

随机推荐

  1. 今日头条 2018 AI Camp 5 月 26 日在线笔试编程题第一道——最佳路径

    题目 给定一个 n*m 的矩阵 A ,矩阵中每一个元素为一个十六进制数.寻找一条从左上角都右下角的路径,每次只能向右或者向下移动, 使得路径上所有数字之积在 16 进制下的后缀 0 最少. 输入描述: ...

  2. mysql 导入 大sql文件

    任务:第一次用mysql,需要将一个1G左右的sql文件导入: 步骤:1:安装mysql-installer-community-5.7.20.0.msi 64位安装包 2:命令行登录:  mysql ...

  3. HDU 2491 Priest John's Busiest Day(贪心)(2008 Asia Regional Beijing)

    Description John is the only priest in his town. October 26th is the John's busiest day in a year be ...

  4. 课堂练习之找数字0-N中“1”出现的次数

    一.题目与要求 题目:给定一个十进制的正整数,写下从1开始,到N的所有整数,然后数一下其中出现“1”的个数. 要求:1.写一个函数 f(N) ,返回1 到 N 之间出现的“1”的个数.例如 f(12) ...

  5. 转 【关于api-ms-win-crt-runtimel1-1-0.dll缺失的解决方案】

    关于api-ms-win-crt-runtimel1-1-0.dll缺失的解决方案 目录 关于api-ms-win-crt-runtimel1-1-0dll缺失的解决方案 目录 安装VC redite ...

  6. C# .net 调用QQ邮箱

    public static void QQfs() { try { MailMessage mm = new MailMessage(); MailAddress Fromma = new MailA ...

  7. wine update错误 "the cache has no package" error when wine update is available

    网址:https://bugs.launchpad.net/pipelight/+bug/1318321/

  8. Matlab画平滑曲线的两种方法

    自然状态下,用plot画的是折线,而不是平滑曲线. 有两种方法可以画平滑曲线,第一种是拟合的方法,第二种是用spcrv,其实原理应该都一样就是插值.下面是源程序,大家可以根据需要自行选择,更改拟合的参 ...

  9. nginx 反向代理 ,入门

    入门:http://www.cnblogs.com/jjzd/p/6691500.html 启动,重新加载:http://blog.csdn.net/zhongguozhichuang/article ...

  10. bootstrap-datetimepicker 开始时间与结束时间互相约束

    JS $("#start").datetimepicker({ keyboardNavigation: false, language: 'zh-CN', forceParse: ...