简体   繁体   中英

Fastest way to transfer files to EC2 over Session Manager

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM