This page explains how to install and test Docker on Amazon Linux 2 over ssh based session.
How to install Docker on Amazon Linux 2 - nixCraft (cyberciti.biz)
Docker Installation | Docker containers on CentOS | Docker on AWS EC2 instance
INSTALL DOCKER ENGINE ON AMAZON EC2 RHEL 8/9
How to setup and use Docker on Free AWS Linux | Complete beginners hands-on in 7 Steps
How to install Docker on Amazon Linux