3

I regularly need to move large files to and from an EC2 instance connected via Session Manager. File transfers within AWS are fast as are files between local machines and non AWS assets over our fiber connection.

However, upstream and downstream speeds with EC2 over Session Manager are really slow -- like around 1MB/s. I proxy ssh over Session Manager which allows me to use regular utilities to move things around. Is this a Session Manager thing, a function of how I'm using, it or something else?

If this is the best I can do, I'll have to deal with it, but I'd love to use a better way if there's one available.

Kyle Banerjee
  • 2,554
  • 4
  • 22
  • 30
  • The low tech workaround I've been using for giant files is to transfer them to a server I don't need ssm for and then pull them from the EC2 instance. Definitely suboptimal from multiple perspectives but way faster than SSM – Kyle Banerjee May 26 '22 at 21:27
  • Using S3 as an intermediate also works, but is not an additional step that should have to be taken – Rory May 30 '22 at 09:55

1 Answers1

7

I discovered exactly the same issue when using rsync and other file transfer tools via SSM. Uploads speeds to an EC2 instance that were ~15 MB/s when connecting directly (using its public IP, not using SSM) appeared limited to between 300 and 800 KB/s when going via SSM.

I contacted AWS support for clarifications, and their response included:

"After discussing this situation with our SSM service team, they have mentioned that there will be some delay in SCP over Session Manager compared to direct SCP as there are extra hops in communication in SCP via SSM. Apart from the extra hops, there are other limits imposed in this feature which controls the rate of packet transfer and size of packet. These restrictions are placed to prevent misuse on the feature.

Therefore, there is not a way to mitigate this speed limitation you have encountered due to this."

This Github issue from 2019 on the aws-ssm-agent repo indicates slow performance which they claimed was resolved, but it seems they do not expect users to manage large file uploads/downloads via SSM.

Rory
  • 170
  • 2
  • 9