Posts

Showing posts from April, 2019

Use Instance Store With AWS Elastic Container Storage

Many EC2 instance types come with instance attached storage ( Instance Store ) which can provide a fast local storage that is faster than using an EBS volume. If your using the Amazon ECS-optimized AMI (Amazon Linux 1), it’s instance storage is a secondary EBS volume that is used for storing docker containers and volumes. If your launching it on an EC2 with instance store, it is ignored and only the one EBS volume is used . Update July 3, 2019: Added details for Amazon Linux 2 Amazon Linux 1: Amazon ECS-optimized AMI The Amazon Linux 1 based version of the ECS AMI uses the Device Mapper storage driver for container storage, which uses a thin-pool volume (part of LVM). Here is a simplistic cloud-init script that detects the attached SSD and NVMe SSD’s and adds them to the LVM volume group. Just launch your EC2 instance with the following user data or download the script from this gist if you’ve got a more complex init script already. Note: I have not done thorough performance testin