So pyinfra itself won't do this - but because inventory/etc is written in Python it's possible to easily achieve this by using boto3 directly in the inventory file.
The use of Python for the inventory + deploy code makes it possible to integrate pyinfra with almost any external tool, without specific support in pyinfra (that's the theory, at least!).
The use of Python for the inventory + deploy code makes it possible to integrate pyinfra with almost any external tool, without specific support in pyinfra (that's the theory, at least!).