官术网_书友最值得收藏!

Storage in AWS and EC2

Up until now, we have exposed how to create machines and networking infrastructure in AWS. One important thing when building applications is the storage of the data. By default, when we launch a machine in EC2, there are two types of storage that can be associated with the machine in the root volume in order to run the operating system:

  • Instance storage backed images

  • Amazon Elastic Block Store (Amazon EBS) storage backed images

The first one, instance storage backed images, relies on the storage associated with the image to mount and run the root volume. This means that the data stored in the image will be lost once the machine is terminated (these type of images do not support the stop action; they just support termination).

The second type of instances are the ones backed by EBS. Elastic Block Store is the name that AWS gives to its storage capabilities. With EBS, the user can create and destroy volumes (block devices) as needed as well as snapshots: we can create a copy of a running image before carrying a risky operation so we can restore it if something goes wrong.

The type of storage can vary depending on our needs: you can create things from magnetic block devices to SSD drives as well as general-purpose units that can cover a lot of the use cases in all the applications.

In general, all the instances are backed by EBS as the fact that the storage is a logically segregated from compute enables us to do things such as resizing an instance (for example, creating a more powerful instance) without losing the data.

Several volumes can be mounted into the same EC2 instance that gets exposed to it as if a physical device were attached to it, so if we are using a Linux-based image (such as Ubuntu), we can use the mount command to mount the devices into folders.

主站蜘蛛池模板: 凌云县| 鄂伦春自治旗| 加查县| 乌鲁木齐市| 法库县| 三都| 腾冲县| 简阳市| 修武县| 沁源县| 广东省| 清流县| 繁峙县| 武穴市| 河西区| 荆州市| 黎城县| 青浦区| 黄梅县| 来宾市| 浠水县| 福州市| 象州县| 合川市| 宝鸡市| 乐山市| 文昌市| 西乌| 玉田县| 偃师市| 永兴县| 吉首市| 长岭县| 大同县| 桃园市| 中西区| 株洲县| 九江县| 泽州县| 民县| 鹿邑县|