How to create a reverse port tunneling to your personal computer using an EC2 instance

Important: make sure your EC2 instance security group allows access to port 10002

ssh -R 10002:localhost:80 -i <your-ec2-cert.pem> <username>@<server-ip>

For example:

ssh -R 10002:localhost:80 -i my-cert.pem ubuntu@

** Port doesn't have to be 10002, this is just an example, but whenever port you chose, make sure to open that port on your EC2 instance.