$ sudo amazon-linux-extras install docker
$ sudo service docker start
$ sudo usermod -a -G docker ec2-user
$ sudo systemctl enable docker.service
$ sudo curl -L "<https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$>(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose