community.aws
community.aws copied to clipboard
Don't use S3 for file transfers in SSM connection plugin
Summary
As noted in #1853 we believe that using S3 to transfer all of the small files required to run tasks is part of what is making the aws_ssm connection plugin so slow
We should provide an option to transfer files using the SSM session, similar to the piped
method in the ssh
connection
Issue Type
Feature Idea
Component Name
aws_ssm
Additional Information
I believe that one of the performance issues with the aws_ssm connection plugin is that all files are transferred using S3, and that there are multiple file transfers required for each task. Ansible needs to transfer the ansiball_z task files in addition to the files we actually need to transfer, and it doesn't re-use these
The ssh connection has a piped
option that uses dd
to transfer files. Whilst this is not compatible with Windows hosts, it does suggest that this way of transferring files could work here
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/ssh.py#L1285
I believe that implementing Linux and Windows equivalents of that piped
mode would improve performance with the aws_ssm connection plugin, though maybe only for smaller files. In fact, the Windows equivalent is probably more important than the Linux version because for Linux hosts many people can instead use SSH over SSM and we have found that Windows hosts take a bigger performance hit than Linux hosts when running this plugin
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct