To use rsync command with an aws ec2 instance or any other linux machine here is an example:
rsync -avL --progress \
-e "ssh -i /full/path/to/mykeypair.pem -p 2222" \
/path/to/source/* \
<aws_user>@<aws_ec2_ip>:/path/to/target/
If the default port is used [22], then you don't need to provide the port -p 2222
in the command.
Also, if the default private key is used for authentication, you don't need to provide the key path to the command