I used to use the below scp command to copy files from my local machine to instances earlier.
scp -i /path/to/pem/file /path/to/source user@ip-address:/path/to/destination
But for a new instance, I do not have access to the PEM file. We are using AWS CLI to manage access to new instances and hence, there is no need for a PEM file. Is there a way to copy files using AWS CLI as well?
PS: I'm using Ubuntu 20.10 (if that helps)