Check out these two videos to know how to setup and run your Appium Python test cases in Android device on AWS Device Farm:
https://www.youtube.com/watch?v=gsF7-ugCLE4
https://www.youtube.com/watch?v=VqAbp1mDzPE