Launch an instance storage backed ec2 instance with the default ECS Optimized AMI (c3.* or m3.* family)
Map /dev/xvdcz
to ephemeral0
SSH into it
# stop docker processes
docker ps -q | xargs docker stop
# stop docker
sudo service docker stop
# stop ecs
sudo stop ecs
# remove ecs config data
sudo rm -f /var/lib/ecs/data/*.json
# shutdown
sudo shutdown -H now
Then create the image
aws ec2 create-image --instance-id INSTANCE_ID \
--name custom-ephemeral-amzn-ecs-optimized-2017.03.d \
--description "custom ecs optimized image with ephemeral docker storage" \
--block-device-mapping "[{\"DeviceName\": \"/dev/xvdcz\",\"VirtualName\":\"ephemeral0\"}]" \
--region us-east-1
Spin up a managed cluster using that ami. Make sure that the managed cluster is configured to use only those instance families that support ephemeral storage.