博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
aws ami_AWS AMI – Amazon计算机映像
阅读量:2536 次
发布时间:2019-05-11

本文共 11426 字,大约阅读时间需要 38 分钟。

aws ami

AWS AMI or Amazon Machine Image (AMI) is a way to launch a virtual machine in the AWS cloud. In general, to launch a virtual machine we use the standard distribution of the providers. But what if you want to launch several identical instances of virtual machines. You need something that can give you identical instances each time you launch with a very short launch time.

AWS AMI或A​​mazon Machine Image(AMI)是一种在AWS云中启动虚拟机的方法。 通常,要启动虚拟机,我们使用提供程序的标准分发。 但是,如果要启动几个相同的虚拟机实例该怎么办。 您需要一些可以在每次启动时以非常短的启动时间为您提供相同实例的东西。

The answers to all questions is Amazon Machine Image (AMI). You can launch identical instances as many as you want, all in one go. And it takes a very short time in AWS to launch a virtual machine with AMIs. We have launched an EC2 machine with an AMI in our post “”.

所有问题的答案是Amazon Machine Image(AMI) 。 您可以一次启动任意数量的相同实例。 而且,在AWS中花费很短的时间即可启动带有AMI的虚拟机。 在我们的文章“ ”中,我们推出了带有AMI的EC2计算机。

什么是AMI? (What is AMI?)

AMI is an abbreviation for “Amazon Machine Image”. Amazon Machine Image provides essential information to launch a virtual machine in the cloud. You can launch several instances at a time in case you want multiple instances with the same configurations.

AMI是“ Amazon Machine Image”的缩写。 Amazon Machine Image提供了在云中启动虚拟机的基本信息。 如果您希望多个实例具有相同的配置,则可以一次启动多个实例。

An AMI typically contains three below things in it:

AMI通常包含以下三个内容:

  1. Template – For the root volume for the instances (An application server, an OS, and applications)

    模板–用于实例的根卷(应用程序服务器,操作系统和应用程序)
  2. Permissions to Launch – Which account can use this AMI to launch instances.

    启动权限–哪个帐户可以使用此AMI启动实例。
  3. Block Device Mapping – that specifies the volumes to attach to the instance during its launch time.

    块设备映射–指定在启动期间要附加到实例的卷。

AWS provides you the web interface to launch Amazon EC2 instance. It has ready to instantiate AMIs (Amazon Machine Images) available.

AWS提供了用于启动Amazon EC2实例的Web界面。 它已准备好实例化可用的AMI(Amazon机器映像)。

AWS AMI的类型 (Types of AWS AMI)

There are no certain types of AMI but you can choose an AMI based on the below characteristics:

没有特定类型的AMI,但是您可以根据以下特征选择AMI:

  1. Operating System Based – You can choose a machine image based on the operating System such as Linux, Windows etc.

    基于操作系统 –您可以基于操作系统(例如Linux,Windows等)选择机器映像。
  2. Architecture (32-bit or 64-bit) Based – Based on the architecture of the underlying operating system.

    基于体系结构(32位或64位)的–基于基础操作系统的体系结构。
  3. Region Specific – Region and availability zone specific machines images.

    特定于区域-特定于区域和可用性区域的计算机映像。
  4. Storage Based – Based on the storage for the root device. All Amazon Machine Images are either backed by Amazon EBS or by instance store.

    See the below summary table: (reference : )

    Storage Based Summary

    Storage Based Summary

    基于存储–基于根设备的存储。 所有Amazon Machine Image均由Amazon EBS或实例存储支持。

    请参阅下面的摘要表:(参考: : )

    基于存储的摘要

  5. Launch Permission Based – The owner of the AMI can decide the visibility and launch permission of the AMI. Available launch permissions are:
    1. public – All AWS accounts gets the access of these AMIs.
    2. explicit – Owners grants the permission to specific AWS accounts.
    3. implicit – Only owner has the implicit permissions to launch the AMI.

    基于启动许可– AMI的所有者可以决定AMI的可见性和启动许可。 可用的启动权限为:
    1. 公用 –所有AWS帐户都可以访问这些AMI。
    2. 显式 –所有者将权限授予特定的AWS账户。
    3. 隐式 -只有所有者才具有启动AMI的隐式权限。

Amazon Linux AMI虚拟化类型 (Amazon Linux AMI Virtualization Types)

AWS uses two types of virtualization for Amazon Machine Images:

AWS将两种类型的虚拟化用于Amazon Machine Images:

  1. PV (paravirtual)

    PV(半虚拟)
  2. HVM (hardware virtual machine)

    HVM(硬件虚拟机)

The main differences between PV and HVM AMIs are their booting process. On how they can take advantage of special hardware extensions (CPU, network, and storage) for better performance.

PV和HVM AMI之间的主要区别在于它们的引导过程。 关于他们如何利用特殊的硬件扩展(CPU,网络和存储)以获得更好的性能的信息。

查找/使用Amazon Linux AMI (Find/Use a Amazon Linux AMI)

There are a couple of ways you can find a Linux Amazon Machine Images.

您可以通过两种方式找到Linux Amazon Machine Images。

1.在EC2启动期间选择AMI (1. Choose AMI during the EC2 Launch)

We have discussed and used this option during the EC2 instance launch in our post “”.

在我们的文章“ ”中,我们已经在EC2实例启动期间讨论并使用了此选项。

Follow the below steps:

请按照以下步骤操作:

  1. Go to the Amazon EC2 console at .

    转到的Amazon EC2控制台。
  2. Click on the “Launch Instance” button.
    Create Instance Ec2

    Create Instance EC2

    单击“启动实例”按钮。

    创建实例EC2

  3. You will see the below option to “Choose an Amazon Machine Image (AMI)”. Choose an existing AMI for quick start.
    Step 1 Choose AMI

    Choose AMI

    You can see that there are three options available to choose the AMIs.

    • My AMI – The AMIs created by you will be there in this tab.
    • AWS Marketplace – The AWS Marketplace is for the paid Amazon Machine Images. You can create and sell your AMIs in AWS marketplace.
    • Community AMIs – The AMIs which are build by and for public usage.

    您将看到以下选项“选择Amazon Machine Image(AMI)” 。 选择现有的AMI以快速入门。

    选择AMI

    您可以看到有三个选项可供选择。

    • 我的AMI –您创建的AMI将在此选项卡中。
    • AWS Marketplace – AWS Marketplace适用于付费的Amazon Machine Images。 您可以在AWS市场中创建和销售AMI。
    • 社区AMI –由公共用途构建的AMI。

2.从“图像”页面中选择“ AMI” (2. Choose AMI from Image Page)

  1. Go to the Amazon EC2 console at .

    转到的Amazon EC2控制台。
  2. Select the “AMI” option from left navigation bar under the “IMAGES” menu. You will see the below page.
    Amazon Machine List Page

    Amazon Machine Image List Page

    “图像”菜单下的左侧导航栏中选择“ AMI”选项。 您将看到以下页面。

    Amazon Machine Image列表页面

  3. Filter in the search bar is optional. Select the “Public Images” in the dropdown. Now, search on the any parameters such as Name, Owner, Architecture, Creation. Description, Image Type etc. There are many options available to search the AMI.
    List Public Amazon Machine Images

    List Public Amazon Machine Images

    搜索栏中的过滤器是可选的。 在下拉菜单中选择“公共图像” 。 现在,搜索任何参数,例如名称,所有者,体系结构,创建。 说明,图像类型等。有许多选项可用于搜索AMI。

    列出公共Amazon机器映像

  4. Once you found the AMI of your choice, click on the “Launch” button. You will see the second step of launching an EC2 instance below:
    Choose Instance Type

    Choose Instance Type

    找到所需的AMI后,单击“启动”按钮。 您将在下面看到启动EC2实例的第二步:

    选择实例类型

Note: From here now on, you can follow the steps described in post “” under heading “Setup EC2 Instance”.

注意:从现在开始,您可以按照标题为“设置EC2实例”下的“ ”帖子中描述的步骤进行操作。

共享AMI (Shared AMIs)

As per the name, Shared AMIs are the Amazon Machine Images which are created by developers and are publically available for use. You can create and share the EMIs on AWS.

顾名思义,共享AMI是由开发人员创建的Amazon机器映像,可以公开使用。 您可以在AWS上创建和共享EMI。

If you are going to use the shared AMIs then use these on your own risk. Amazon or developers can’t vouch for the integrity or security of AMIs shared by other Amazon EC2 users. AWS recommends using the AMIs from trusted sources only for security reasons.
如果要使用共享的AMI,则使用它们的风险自负。 Amazon或开发人员无法保证其他Amazon EC2用户共享的AMI的完整性或安全性。 AWS建议仅出于安全原因使用来自受信任来源的AMI。

查找共享的AMI (Find Shared AMIs)

We have already discussed this in the section above under the heading “Choose AMI from Image Page”. See the steps that we use to find public shared AMIs.

我们已经在上面的“从图像页面选择AMI”标题下的部分中对此进行了讨论。 请参阅我们用于查找公共共享AMI的步骤。

发布公共AMI (Publish a Public AMI)

AWS allows you to create your own Amazon Machine Images and share them with other AWS users. You can restrict the use to certain AWS accounts also. You will not be billed if someone uses your AMI, only the user will be billed.

AWS允许您创建自己的Amazon Machine Images并与其他AWS用户共享。 您也可以将其限制为使用某些AWS账户。 如果有人使用您的AMI,则不会向您收费,只会向该用户收费。

After you make an AMI public it will be available in the “Community AMIs” section. Follow the below steps to create a public AMI:

公开AMI后,它将在“社区AMI”部分中可用。 请按照以下步骤创建公共AMI:

  1. Go to the Amazon EC2 console at .

    转到的Amazon EC2控制台。
  2. Select the “AMI” option from left navigation bar under the “IMAGES” menu.

    “图像”菜单下的左侧导航栏中选择“ AMI”选项。
  3. Select the AMI from the list that you want to make public and then choose “Actions” option “Modify Image Permissions”.

    从要公开的列表中选择AMI,然后选择“操作”选项“修改图像权限”
  4. Choose option “Public” and “Save”.

    选择选项“公共”“保存”

Note: If you want to share the AMI to a certain AWS account then you can choose the “AWS Account Number” field and then “Add Permissions”.

注意:如果要与特定的AWS账户共享AMI,则可以选择“ AWS账户号码”字段,然后选择“添加权限”

付费AMI ()

You can purchase AWS AMI from the “Amazon Marketplace”.

您可以从“ Amazon Marketplace”购买AWS AMI。

Amazon EC2 is also integrated to use the Amazon Marketplace where developers can buy and sell their AMIs. You can find, Buy, and deploy your AMI here at .

还集成了Amazon EC2以使用开发人员可以在其中买卖AMI的Amazon Marketplace。 您可以在找到,购买和部署AMI。

Launching an AMI from the Amazon Marketplace is exactly similar to any other instance launch. So, the steps are almost the same to find a paid AMI:

从Amazon Marketplace启动AMI与任何其他实例启动完全相似。 因此,找到付费AMI的步骤几乎相同:

  1. Go to the Amazon EC2 console at .

    转到的Amazon EC2控制台。
  2. Select the “AMI” option from left navigation bar under the “IMAGES” menu.

    “图像”菜单下的左侧导航栏中选择“ AMI”选项。
  3. Choose “Public Images” from the filter.

    从过滤器中选择“公共图像”
  4. Now in search bar, choose “Owner : AWS Marketplace”. And you will see the list of paid AMIs. See below screenshot for your reference:
    Paid Amazon Machine Images

    Paid Amazon Machine Images

    现在,在搜索栏中,选择“所有者:AWS Marketplace” 。 您将看到付费AMI列表。 请参阅下面的屏幕快照以供参考:

    付费Amazon Machine Images

  5. The rest of the steps are same to launch the instance from the chosen AMI.

    其余步骤与从所选AMI启动实例相同。

创建自己的AMI (Creating your own AMI)

AWS provides you the options to create your own AMI as well. The classical case of creating AMI is that you have an EC2 instance running and want to make an AMI of it. So that you can launch other instances in the future from this.

AWS还为您提供了创建自己的AMI的选项。 创建AMI的经典案例是您正在运行一个EC2实例,并希望对其进行AMI。 这样您将来就可以从中启动其他实例。

Let’s create an AMI from the running EC2 instance. Please follow the below steps:

让我们从正在运行的EC2实例创建AMI。 请按照以下步骤操作:

  1. Go to the Amazon EC2 console at .

    转到的Amazon EC2控制台。
  2. Select the EC2 instance, click on “Actions”. Drag mouse on the “Image” submenu and you will see the below options:
    Create Amazon Machine Image

    Create Amazon Machine Image

    选择EC2实例,单击“操作” 。 在“图像”子菜单上拖动鼠标,您将看到以下选项:

    创建Amazon机器映像

  3. Click on “Create Image”, below dialog will open with some inputs to fill.
    Fill Details To Create Amazon Machine Image

    Fill Details To Create Amazon Machine Image

    • Instance Id – EC2 instance Id
    • Image Name – You can give any name to your AMI
    • Image Description – (optional)
    • Instance Volume – AWS will pick the default volume settings which is attached with your instance. You can change the volume size and volume type as per your requirements.
    • You can also attach new volume to your AMI

    点击“创建图像” ,下面的对话框将打开,其中包含一些输入。

    填写详细信息以创建Amazon Machine Image

    • 实例ID – EC2实例ID
    • 映像名称–您可以给AMI指定任何名称
    • 图片说明- (可选)
    • 实例卷– AWS将选择实例随附的默认卷设置。 您可以根据需要更改卷大小和卷类型。
    • 您还可以将新卷附加到AMI
  4. Click on “Create Image” button. AWS will start creating your AMI in back and you will receive a message that “Create Image request receive”.
    Create Image Request Received

    Create Image Request Received

    点击“创建图像”按钮。 AWS将开始在后面创建您的AMI,您将收到一条消息“ Create Image request receive”

    创建收到的图像请求

  5. You can on the Image name or “Close” button and you will see that your image has been listed in AMIs under “Owned by me” section.
    Amazon Machine Image Created

    Amazon Machine Image Created

    您可以在“图像名称”或“关闭”按钮上单击,然后会看到您的图像已在AMI的“我拥有的”部分下列出。

    创建的Amazon Machine Image

注销您的AMI (Deregister Your AMI)

If the AMI is no longer required then you can deregister it in simple steps.

如果不再需要AMI,则可以通过简单的步骤注销它。

  1. Go to the Amazon EC2 console at .

    转到的Amazon EC2控制台。
  2. Select the “AMI” option from left navigation bar under the “IMAGES” menu.

    “图像”菜单下的左侧导航栏中选择“ AMI”选项。
  3. Select option “Owned by me” and choose the AMI to deregister from the “Actions”.
    Deregister Amazon Machine Image

    Deregister Amazon Machine Image

    选择选项“我拥有”,然后从“操作”中选择要注销的AMI。

    取消注册Amazon Machine Image

  4. Click on “Deregister” and you system will prompt a dialog with an options to “Continue”.
    Deregistered Amazon Machine Image

    Deregistered Amazon Machine Image

    单击“注销” ,系统将提示一个对话框,其中包含“继续”选项。

    注销的Amazon Machine Image

Click on “Continue” button and your AMI will be deregistered. You will not have the AMI under the section “Owned by me”.

单击“继续”按钮,您的AMI将被注销。 您不会在“我拥有的”部分下拥有AMI。

翻译自:

aws ami

转载地址:http://jqmzd.baihongyu.com/

你可能感兴趣的文章
【Linux网络编程】使用GDB调试程序
查看>>
feign调用spring clound eureka 注册中心服务
查看>>
ZT:Linux上安装JDK,最准确
查看>>
LimeJS指南3
查看>>
关于C++ const成员的一些细节
查看>>
《代码大全》学习摘要(五)软件构建中的设计(下)
查看>>
C#检测驱动是否安装的问题
查看>>
web-4. 装饰页面的图像
查看>>
微信测试账户
查看>>
Android ListView上拉获取下一页
查看>>
算法练习题
查看>>
学习使用Django一 安装虚拟环境
查看>>
Hibernate视频学习笔记(8)Lazy策略
查看>>
CSS3 结构性伪类选择器(1)
查看>>
IOS 杂笔-14(被人遗忘的owner)
查看>>
自动测试用工具
查看>>
前端基础之BOM和DOM
查看>>
[T-ARA/筷子兄弟][Little Apple]
查看>>
编译Libgdiplus遇到的问题
查看>>
【NOIP 模拟赛】Evensgn 剪树枝 树形dp
查看>>