This is a rather broad question, to the degree that a book could be written in reply. It is probably better if you narrow down the question, and then ask a question on what you are stuck on.
To get to that point, I suggest you look at the docs for AWS Device Farm and see how it works. My guess is that you transmit your Android build to an AWS file system, and then call a test endpoint, and then poll an API to check on progress. You can probably do this via curl or similar, but the docs will help you there. Finally you can probably download a test report, which you can declare as a CircleCI artefact.
Give it a go?