From Ec2 Session Manager - [patched] Download File
: Attach an IAM Role to your EC2 instance that allows s3:PutObject to your bucket. Upload from EC2 : Inside your Session Manager terminal, run: aws s3 cp /path/to/file.txt s3://your-bucket-name/ Use code with caution.
If you are dealing with large files or directories, using an Amazon S3 bucket as a "staging area" is often faster and more reliable than tunneling. download file from ec2 session manager
: On your local machine, use the AWS CLI to pull the file: aws s3 cp s3://your-bucket-name/file.txt ./ Use code with caution. : Attach an IAM Role to your EC2
Method 3: Port Forwarding with Netcat (No SSH Keys Required) download file from ec2 session manager