You can access a closed off AWS EC2 instance using SSH by using SSM as a proxy. This means no ports need be exposed from your EC2 at all.
Configure the AWS Client
aws configure
Specify your user access key, secret and region.
Connect to the EC2 instance
aws ssm start-session --target [instance_id]
Connect to SSH through an SSM port forward
aws ssm start-session --target [instance_id] \
--document-name AWS-StartPortForwardingSession \
--parameters '{"portNumber":["22"], "localPortNumber":["2222"]}'
ssh -p 2222 -i ~/.ssh/id_rsa root@localhost
