Amazon Linux 2 AMI install docker

Shell
sudo yum update -y
sudo amazon-linux-extras install docker
# Start Docker service
sudo service docker start
Source

Also in Shell: